PCRE2 Perl-Compatible Regex
github.com
5
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
PCRE2 (Perl Compatible Regular Expressions version 2) is a C library implementing regex pattern matching using Perl 5 syntax and semantics. Originally created by Philip Hazel at the University of Cambridge in 1997 (as PCRE), PCRE2 is the successor with a cleaner API. With over 1,500 stars as of 2026, PCRE2 serves as the default regex engine for PHP, Apache, nginx, Postfix, Exim, and countless applications. Key features include: Perl 5 compatibility (supporting backreferences, look-ahead/behind assertions, named subpatterns, atomic groups, and conditional subpatterns), multi-width API (8-bit, 16-bit, and 32-bit character modes supporting ASCII, UTF-8, UTF-16, and UTF-32), JIT compilation (compiling patterns to native machine code via SLJIT for 5-10x faster matching, supporting x86, ARM, MIPS, PowerPC, and S390x), Unicode support (full property support via backslash-p syntax, case folding, and grapheme cluster segmentation), DFA matching (alternative engine using deterministic finite automata for linear-time matching without backtracking), callouts (invoking C callbacks during matching for custom processing), serialization (saving and loading compiled patterns for reuse), substitution (find-and-replace with backreferences and named groups), JIT stack management, and pcre2grep (a grep-like CLI built on PCRE2).
Statistics
5
Views
0
Clicks
0
Like
0
Dislike