PCRE Regex Tester
Test classic PCRE (Perl-compatible) patterns — the flavor used by PHP < 7.3, older Apache configs, and legacy tools.
Free, no signup — runs entirely in your browser on RegexEditor.dev.
Annotation
Unable to parse pattern
gglobal: Don't return after first matchiignore case: Case insensitive matchingMatch Results
0 matchesNo matches found
Quick Reference
Test your PCRE regex in the editor below
PCRE regex: what makes it different
- Lookaround & backrefs
- Full Perl-compatible lookaround, backreferences, and recursion support.
- Legacy safety
- PCRE 8.x lacks PCRE2's improved heap limits — catastrophic backtracking protection must come from your own timeouts.
- Delimiter style
- In PHP's preg_* functions the pattern is wrapped in delimiters (/…/i); test the inner pattern and flags separately here.
Classic PCRE (the 8.x series) remains the regex flavor of record for a huge amount of legacy software: PHP before 7.3, older Apache httpd, many Unix tools, and long-lived config formats. It is almost PCRE2, but with subtle behavioral differences that only show up when you test against the real thing.
This tester runs the PCRE engine compiled to WebAssembly. If you maintain legacy PHP or tooling pinned to PCRE 8.x, validate patterns here against the same library version family your production systems use.
PCRE regex FAQ
Is classic PCRE still used?
Yes. PHP before 7.3, many legacy Apache modules, older nginx builds, and numerous long-lived tools link against PCRE 8.x. If your production system pins that library, test against it rather than PCRE2 to avoid subtle drift.
What is the difference between PCRE and Perl regex?
PCRE aims for Perl 5 compatibility but is not exact: some Perl features (like code-embedded patterns (?{…})) are unavailable, and PCRE adds its own extensions. For day-to-day patterns the syntax is effectively the same.