Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: regexp over multiple linesby JavaFan (Canon) |
on Aug 03, 2011 at 07:43 UTC ( [id://918188]=note: print w/replies, xml ) | Need Help?? |
Use the /m modifier. This will treat the string as multiple lines, allowing you to use \n characters as part of your regexp.Bullshit. You don't need any modifier to use \n in your regexp. The /m modifier will change the meaning of ^ and $, irrelevant for the OP. He may need the /s modifier, which makes the dot match a newline.
In Section
Seekers of Perl Wisdom
|
|