I am having some problems with matching across multiple lines, even using the /s modifier. I have a piece of document I need to pick up: it starts with " Start" on one line and finishes with " End" on another.
I have tried using the following bit of code:
But this doesn't seem to print anything. What am I doing wrong?while(<>){ if (m/ Start(.*?) End/sg) {print $1;} }
Cheers,
S D
In reply to Matching across multiple lines by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |