I have a file full of records split across multiple lines. The records start with wordA or wordB and end with either wordC or wordD followed by a blank line.
Can someone tell me how to start searching for either of 2 words and stop searching when I discover either of the other 2 words followed by a blank line.
I should be able to use the range operator - but its not playing.
Trying local $/ = undef; $StartTN = qr/(^DES|^TN).*?/; $EndTN = qr/((DATE[ A-Z0-9]*)+?(?=^$)|ZONE [ A-Z0-9]*(?=^$))/; if ( /($StartTN)/smx .. /($EndTN)/smx) { }
In reply to Regex Question by set_uk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |