in reply to Re^3: Advanced techniques with regex quantifiers
in thread Advanced techniques with regex quantifiers
Hello AnomalousMonk,
Your code works fine for me in Perl 5.20.2, but breaks in Perl 5.22.0 with the runtime error reported by smls. perl5220delta has the following in its New Diagnostics section:
- Invalid quantifier in {,} in regex; marked by <-- HERE in m/%s/
(F) The pattern looks like a {min,max} quantifier, but the min or max could not be parsed as a valid number: either it has leading zeroes, or it represents too big a number to cope with. The <-- HERE shows where in the regular expression the problem was discovered. See perlre.
(Note: the (F) here indicates a fatal but trappable error.)
So it seems that leading zeroes in a quantifier were always meant to be considered an error, but were previously overlooked?
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|