compile
public static Pattern compile(String regex,
int flags)Compiles the given regular expression into a pattern with the given flags.
Parameters:
regex - The expression to be compiled
flags - Match flags, a bit mask that may include CASE_INSENSITIVE, MULTILINE, DOTALL, UNICODE_CASE, and CANON_EQ
Throws:
IllegalArgumentException - If bit values other than those corresponding to the defined match flags are set in flags
PatternSyntaxException - If the expression's syntax is invalid