my $string1 = "123"; if($string1=~/[^0-9]|[^a-z]/){ print "Keine Zahl, kein a-z"; }