Just another Perl shrine | |
PerlMonks |
Re: Is this a bug in perl regex engine or in my brain?by Athanasius (Archbishop) |
on Oct 06, 2015 at 16:05 UTC ( [id://1143942]=note: print w/replies, xml ) | Need Help?? |
Hello nikmit, This (as expected) matches digits in the range 1-249. But it also matches 00, 01, 02, etc. This is easily fixed by removing the first ? quantifier:
But I would rather use qr here, together with the /x modifier to make it easier to read:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|