c:\@Work\Perl\monks>perl -wMstrict -le "for my $s (qw(a_________ %%a_____%% 123456789_)) { print qq{'$s' matches} if $s =~ /[[:alnum:]]+[_]+/; } " 'a_________' matches '%%a_____%%' matches '123456789_' matches