Regex Tester
Test a regular expression against sample text and see every match with capture groups.
Share on Social Media:
Enter a PCRE pattern, optional flags, and a test string to see every match, its capture groups, and byte offsets.
Frequently Asked Questions
PHP's PCRE (Perl-Compatible Regular Expressions) engine, the same one used by preg_match — very close to most other languages' regex syntax.
Standard PCRE flags are supported, such as i (case-insensitive), m (multiline), s (dot matches newline), and u (Unicode mode).
PCRE (used here) and JavaScript's regex engine share most syntax but differ on some details — like named group syntax and certain lookbehind support — so a pattern written for one may need small tweaks for the other.
Yes — paste multi-line text as your test string, and use the "m" (multiline) flag if you want ^ and $ to match the start/end of each line rather than just the whole string.