Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Printing the pre-compiled regex, I get:
and from perlre#Extended-Patterns it appears that this is equivalent to (?ud-imsx:^ab$), which explicitly turns off the m modifier throughout of the embeded pattern-match modifier. So adding /m to the regex has no effect, because it is overridden within the (?-m:...) construct inside the regex. I don’t know how all this worked in earlier versions of Perl, but in recent versions, it seems you have to add the /m modifier when the regex is first constructed using qr//:
Hope that helps,
In reply to Re: This regex surprised me
by Athanasius
|
|