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.
In reply to Re: how to write multi-line regex
by shmem
in thread how to write multi-line regex
by herman4016
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |