I am trying to parse a file similar to the following:
======================================================== Net Stuff ======================================================== slfjs sfafdds aslfkjsdl sfsdf ======================================================== Services ======================================================== blah glah sfsd asfsdf afsafdf ======================================================== Users ======================================================== Services sam bill frank
I am attempting to match between the first match of "Services", and not after, but I am getting everything using the following code:
while(<>) { if ( /^Services$/ .. /^Users$/ ) { print "$_"; } }
Even when I use multi-line match regular expression, I get the same output:
while(<>) { if ( /^=*Services$/m .. /^=*Users$/m ) { print "$_"; } }
Once again, I just want what is in between first occurrence of "Services" and "Users".
Any ideas?
In reply to Matching ranges by ldbpm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |