how to check if string contains num,bers and . code example Example: check if string contains numbers str.matches(".*\\d.*");