Project history
PCRE2 is the successor line to Philip Hazel's PCRE library, released in January 2015 as PCRE with a revised API rather than as a drop-in replacement. Hazel's release announcement explicitly said PCRE2 did not replace PCRE 8.36 because the API was incompatible, that development work would concentrate on PCRE2, and that new projects should use PCRE2 where possible.
The redesign addressed limits that had built up after nearly two decades of the original API. The PCRE2 manual describes a more extensible API, automatic optimization instead of a separate study step, renamed calls such as pcre2_match, size_t-based offsets, redesigned error handling, explicit pcre2_jit_compile, pcre2_substitute, and support for binary zeros in patterns, subjects, and replacement strings.
PCRE2 kept PCRE's ecosystem role as an embeddable C regex engine with Perl-compatible syntax, while making the library easier to integrate in modern codebases. The upstream README describes it as self-contained, portable, BSD-licensed, suitable for proprietary software, Unicode-capable, available in 8-, 16-, and 32-bit code-unit libraries, optionally accelerated by JIT, and consumed by open-source and commercial products including Apache, Git, PHP, R, Excel, and Safari.
Practitioners use PCRE2 either indirectly through applications and language runtimes or directly through libpcre2-8, libpcre2-16, or libpcre2-32. The package also ships pcre2grep for Perl-compatible file searching, pcre2test for exploring and debugging pattern behavior, and pcre2-config for build integration. For new C/C++ software, PCRE2 is the maintained branch; the original PCRE remains a legacy ABI for older dependents.