|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re^3: Passing variables into regular expressionsby Tanalis (Curate) |
| on Apr 20, 2006 at 13:32 UTC ( #544599=note: print w/ replies, xml ) | Need Help?? |
|
Interesting. The docs indicate that the s flag causes the input string to be treated as if it's a single line. The m flag, on the other hand, causes the string to be treated as if it's multi-line. It seems that .*? can't cross the newline character when using the m flag: Treating the \n as whitespace (or explicitly naming it in the regex) seems to solve the problem. Any ideas why that'd be the case? -- Tanalis
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||