in reply to reg exp
The first place to go is `man perlre`: you should get rid of all these [ and ] characters when they're redundant..
for( qw{ 2312112 abc-erte } ){ print "$_ ", m<^(?: \d{5,8} #5 to 8 digits | # OR \w{3} # 3 alpha chars # (maybe you want to replace \w) - # one hyphen .{4} # 4 chars )$>x ? 'matches' : 'doesn\'t match', "\n"; }
update: typos at end of regexp
--
|
|---|