new#
Compile a pattern into a Peta::PCRE2 object.
$options is a bitwise OR of the PCRE2_* compile constants (default 0). A UTF8-flagged pattern automatically adds PCRE2_UTF|PCRE2_NO_UTF_CHECK. The pattern is JIT-compiled when the library supports it; jit reports whether that succeeded. Croaks with PCRE2’s message and the byte offset on a bad pattern.
Synopsis#
my $re = Peta::PCRE2->new("a[act]ggtaaa|tttacc[agt]t");
my $ci = Peta::PCRE2->new("hello", PCRE2_CASELESS);