my $string =~ /[^\d\- ]/; #### if ( $string =~ /^[^\d\- ]+$/ ) { # do something here }