Compiles a Perl5 regular expression into a Perl5Pattern instance that can be used by a Perl5Matcher object to perform pattern matching. Please see the user's guide for more information about Perl5 regular expressions.
@param pattern A Perl5 regular expression to compile.
@param options A set of flags giving the compiler instructions onhow to treat the regular expression. The flags are a logical OR of any number of the five MASK constants. For example:
regex = compiler.compile(pattern, Perl5Compiler. CASE_INSENSITIVE_MASK | Perl5Compiler.MULTILINE_MASK);
This says to compile the pattern so that it treats input as consisting of multiple lines and to perform matches in a case insensitive manner.
@return A Pattern instance constituting the compiled regular expression.This instance will always be a Perl5Pattern and can be reliably casted to a Perl5Pattern.
@exception MalformedPatternException If the compiled expressionis not a valid Perl5 regular expression.