Matcher pattern() method in Java with Examples
The pattern() method of Matcher Class is used to get the pattern to be matched by this matcher. Syntax: public Pattern pattern() Parameters: This method do not accepts any parameter. Return Value: This method returns a Pattern which is the pattern to be matched by this Matcher. Below examples illustrate the Matcher.pattern() method: import java.util.regex.*; … Read more