P is for Practical | |
PerlMonks |
Regex bug? matching multiple newline with /mby NERDVANA (Deacon) |
on Aug 09, 2021 at 08:15 UTC ( [id://11135722]=perlquestion: print w/replies, xml ) | Need Help?? |
NERDVANA has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I ran across a strange behavior and I'm wondering if it is a bug, or some obscure documented behavior I should keep in mind.
These match:
(with '$' consuming a "\n" because it is /m mode) These do not match:
This is greedy but only matches one line
and it seems to me that all of them should match. This appears to happen as old as 5.8.9 and as new as 5.32.1 Any insights?
Back to
Seekers of Perl Wisdom
|
|