matches() Returns TRUE if the current string matches the regular expression s; otherwise FALSE. Syntax Boolean matches(String s) s is the regular expression which is compared against the current string.