In the \"Advanced Regular Expresssion\" chapter in Mastering Perl, I have a broken example for which I can\'t figure out a nice fix. The example is perhaps trying to be too clev
I don't think it's possible without some form of variable-width look-behind. The addition of the \K
assertion in 5.10 provides a way of faking variable-width positive look-behind. What we really need is variable-width negative look-behind but with a little creativity and a lot of ugliness we can make it work:
use 5.010;
$_ = '$1234567890.123456789';
s/(?
If there was ever a pattern that begged for the /x
notation it's this one:
s/
(?