Tells whether or not this string matches the given
regular expression.
An invocation of this method of the form str.matches(regex) yields exactly the same result as the expression
{@link java.util.regex.Pattern}. {@link java.util.regex.Pattern#matches(String,CharSequence) matches}(regex, str)
@param regex the regular expression to which this string is to be matched
@return
true if, and only if, this string matches thegiven regular expression
@throws PatternSyntaxException if the regular expression's syntax is invalid
@see java.util.regex.Pattern
@since 1.4
@spec JSR-51