Home / Dev Tools / Code Tools / Regex Tester

Regex Tester

Test regular expressions against sample text with live match highlighting.
/ / g
Test String
Highlighted Matches (0)
Match Details
Replaced Result

Runs entirely in your browser using JavaScript's native regex engine (ECMAScript flavor) — capture groups, named groups, and lookaheads/lookbehinds are all supported. Behavior may differ slightly from PCRE (PHP), Python, or other regex flavors.

Frequently Asked Questions

No — it uses JavaScript's native regex engine (ECMAScript flavor), which is very similar to PCRE but has some syntax differences, particularly for certain lookaround and Unicode features.

Without the global flag, only the first match is found and highlighted, matching real regex behavior — most testing scenarios want the "g" flag checked.

Yes — the Replacement field supports $1, $2, and named group syntax to preview what a replace operation would produce.

Found this useful? Share it:
Quick Feedback