c:\@Work\Perl\monks>perl -wMstrict -le "for my $str (qw( feed feeder feed001 xfeed001x fee fee001 xfeex --fee-- fe xxx 001 )) { print qq{'$str' -> }, $str =~ m{ feed [[:alnum:]]* }xms ? '' : 'NO', ' match'; } " 'feed' -> match 'feeder' -> match 'feed001' -> match 'xfeed001x' -> match 'fee' -> NO match 'fee001' -> NO match 'xfeex' -> NO match '--fee--' -> NO match 'fe' -> NO match 'xxx' -> NO match '001' -> NO match