You might get away with this, provided the spurious blank lines don't turn up just after the ZONE 001 in the third section of your example dataset.
#! perl -slw use strict; my $data = do{ local $/; <DATA> }; print "'$1'" while $data =~ m[ ( ^(?:DES|TN) .+? (?:^DATE|ZONE) .+\n\s*(?:\n|$) ) ]gsx;
In reply to Re: Re: Re: Re: Re: Regex Question
by BrowserUk
in thread Regex Question
by set_uk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |