check if a string has no numbers code example Example: check if string contains numbers str.matches(".*\\d.*");