XP is just a number | |
PerlMonks |
Re^3: Strange result from "abbbbbc" =~ /(b)*?(b*?)c/by GrandFather (Saint) |
on Aug 01, 2006 at 22:15 UTC ( [id://565096]=note: print w/replies, xml ) | Need Help?? |
It's not evident that that is a "nice use if (X)*" given that different versions of Perl handle the rather bogus expression differently. The same result can be achieved using zero width assertions:
Update s/\Q(?!(?=.*b))\E/(?!.*b)/. Thanks to ikegami for pointing out the redundancy. DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|