+ 2
what pattren class used for?
what pattren class used for? in java
1 Answer
+ 4
Did you mean Pattern class in java.util.regex package? If yes, it is used for working with regular expressions and java.util.regex.Matcher class.
For example you can use static method compile(String regex) to compile a regex.
eg: Pattern.compile("abc"); //matches abc
Then you could use matcher function of Pattern class to work with Matcher class.
Here are the docs of the Pattern and Matcher.
https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html