How about:
which prints:#!/usr/bin/perl while(<DATA>) { chomp; if( /\A[\w]{3}_\w+_ear\Z/ ) { print "$_ matches \n"; } else { print "no joy for $_ \n"; } } __DATA__ ab_wehave_noear abc_test_ear abc_test_two_ear abcc_test_ear
I realize your problem definition said "characters" not "word thingies". I'm confident you can munge it to match your expected input range.no joy for ab_wehave_noear abc_test_ear matches abc_test_two_ear matches no joy for abcc_test_ear
In reply to Re: Help with form validation regex
by mikeraz
in thread Help with form validation regex
by perlnewb123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |