I'm trying to snag multiple lines of data by including the newline character in my pattern:
NAME and SEQ are each on one line.
There may or may not be another line in between:
[tt]<DESC>Description Here</DESC>[/tt]
My hope was that ".*" would get the description line and the newlines on either side. My understanding was that "." matched even a newline. Arnold Robbins...where are you?
I spent some time (not a lot) searching the forum and the FAQ but came up empty.
Ultimately I would like to perform a global substitution once I can get the proper pattern to match.
Regards,
CM >
:O>
Code:
gawk '/<NAME>.*<\/NAME>.*<SEQ>.*<\/SEQ>/' file.xml
NAME and SEQ are each on one line.
There may or may not be another line in between:
[tt]<DESC>Description Here</DESC>[/tt]
My hope was that ".*" would get the description line and the newlines on either side. My understanding was that "." matched even a newline. Arnold Robbins...where are you?
I spent some time (not a lot) searching the forum and the FAQ but came up empty.
Ultimately I would like to perform a global substitution once I can get the proper pattern to match.
Regards,
CM >