```{index} single: new (Peta::FFI::PCRE2) ``` ```{index} single: Peta::FFI::PCRE2::new ``` # new Compile a pattern into a `Peta::FFI::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 ```perl my $re = Peta::FFI::PCRE2->new("a[act]ggtaaa|tttacc[agt]t"); my $ci = Peta::FFI::PCRE2->new("hello", PCRE2_CASELESS); ```