Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: look-ahead greed changed between perl releases?by sn1987a (Deacon) |
on May 06, 2014 at 16:33 UTC ( [id://1085205]=note: print w/replies, xml ) | Need Help?? |
Your reported behaviour in 5.16.3 is what I expect. I do not have a 5.12.4 handy to test. The look ahead is zero-width which means it does not consume any of the input. The regexp matches starting which the s so a % is placed before it. The regexp engine then resumes searching, at the next character and matches starting at the t. This process repeats until there is not enough hyphenated upper case letters to match.
In Section
Seekers of Perl Wisdom
|
|