in reply to how to write multi-line regex
Your input looks like a perfect candidate for "paragraph mode" using the switches -n and -00 (see perlrun):
#!/usr/bin/perl -n00 /^TEXT;\nLAYER 13[1-7];\nTEXTTYPE 0;.+STRING (.+?);/s and print $1,"\n +";
The //s modifier is necessary, since without it, the "." character would not match a newline.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to write multi-line regex
by kcott (Archbishop) on Mar 25, 2014 at 04:15 UTC |