What is the purpose of the Pattern.compile() method in Java regex?
It matches a string with the provided pattern
It creates a new Matcher object from a regular expression pattern
It converts a regular expression into a human-readable format
It compiles a string into a regular expression pattern object
This question is part of this quiz :
Java Regex Basics and Pattern Matching