check if string contains numbers in kotlin code example Example: kotlin string contains integer str.matches(".*\\d.*");