in reply to Is this a bug in perl regex engine or in my brain?
That rejects anything with a leading zero (hence "0"), and anything greater that 255.while (<>) { chomp; my $result = ( /^([1-9]\d*)$/ and $1 < 256 ) ? "matched" : "did no +t match"; $_ .= " $result\n"; print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is this a bug in perl regex engine or in my brain? (matching from 0 to 255)
by Discipulus (Canon) on Oct 07, 2015 at 07:28 UTC |