CompileCompile — compiles a regular expression to a form that is more efficient to
evaluate.
static Regex.Compile(pattern, options)
patternA string specifying the regular expression pattern.
optionsA bitwise OR of zero or more of the following:
PCRE_ANCHORED |
PCRE_BSR_ANYCRLF |
PCRE_BSR_UNICODE |
PCRE_CASELESS |
PCRE_DOLLAR_ENDONLY |
PCRE_DOTALL |
PCRE_DUPNAMES |
PCRE_EXTENDED |
PCRE_EXTRA |
PCRE_FIRSTLINE |
PCRE_JAVASCRIPT_COMPAT |
PCRE_MULTILINE |
PCRE_NEWLINE_CR |
PCRE_NEWLINE_LF |
PCRE_NEWLINE_CRLF |
PCRE_NEWLINE_ANYCRLF |
PCRE_NEWLINE_ANY |
PCRE_NO_AUTO_CAPTURE |
PCRE_UNGREEDY |
PCRE_UTF8 |
PCRE_NO_UTF8_CHECK |
On success, an instance of Regex. On failure, an error
list with three elements: