how to get number from string that contains number and char in android code example Example: check if string contains numbers str.matches(".*\\d.*");