Method - boolean matches(String regex)

This method attempts to match a given regular expression against the complete subject String and returns true/false, indicating whether the match is successful or not. The following are a few important points to note:

  • Regular expression is applied against the entire String; there is no partial matching
  • Regular expression does not need to be anchored using ^ and $, since it is matched against the entire input
  • The equivalent of Pattern.matches(String regex, CharSequenceinput) method (will be covered later)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.84.112