#KOBCI_AQOONTAADA
The Java String matches() method checks whether the string matches the given regular expression or not.
The syntax of the string matches() method is:
string.matches(String regex)
Here, string is an object of the String class.
matches() Parameters:
The matches() method takes a single parameter.
regex - a regular expression
matches() Return Value:
returns true if the regex matches the string.
returns false if the regex doesn't match the string.