in reply to help printing items across multiple lines

What you have there isn't a regex with two captures. It's two regexes with a flip-flop operator between them. I think you want to replace .. with || and just print $1. There is no $2 in your code.

Replies are listed 'Best First'.
Re^2: help printing items across multiple lines
by exsnafu (Initiate) on Jun 04, 2008 at 20:02 UTC
    aha, yes.. my understanding of a flipflop operator seems to have been flawed but now the behavior makes sense to me. however, since I'm now just grabbing $1 twice across two regexes, is there any way I can print both instances on one line? with one regex? I can put two if statements in there with one regex print per but that seems clunky. my end goal is to come up with a file that has a line that shows the Pseudo Name and Logical Device ID fields as a pair for each paragraph entry.