to check if string contain numeric or not code example Example: check if string contains numbers str.matches(".*\\d.*");