I am wondering why the results of the java regex pattern.matcher() and pattern.matches() differ when provided the same regular expression and same string
From the Javadoc, see the if, and only if, the entire region section
/**
* Attempts to match the entire region against the pattern.
*
* If the match succeeds then more information can be obtained via the
* start, end, and group methods.
*
* @return true if, and only if, the entire region sequence
* matches this matcher's pattern
*/
public boolean matches() {
return match(from, ENDANCHOR);
}
So if your String was just "+", you'd get a true result.