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