The matches(...) function has only one variation, not counting syntax variations. It results in a boolean value indicating whether the first string value matches a regular expression pattern given in the second string value.  If the target-string has incorrect syntax, the result of this function will be null.

Syntax:
matches( source-string, target-string )
source-string.matches( target-string )

Parameter Description
source-string

The String which will be checked to against the pattern.

target-string

The String containing the regular expression value to attempt to match.  The variation of the regular expression language used is provided by Java and is documented under Sun Microsystem's Pattern class.