if ( $string =~ /^([^\W\d_]+_\d+)/ ) { print "Matched $1\n"; }