On Perl 5.8.5, the pattern works for me:
#!perl -w for (qw( 00 01 02 03 04 05 06 07 08 09 0 1 2 3 4 5 6 7 8 9 10 20 30 40 50 58 59 )) { die "Ooops: $_ didn't match the regular expression" unless /([012345]?\d)/; }; print "All numbers passed.";
In reply to Re^3: simple pattern match ?
by Corion
in thread simple pattern match ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |