Regex Tester

Test JavaScript regular expressions live: highlighted matches, capture groups, named groups and a replace preview with $1 and $<name> substitutions. Free, in-browser.

How the regex tester works

Your pattern is compiled with JavaScript's native RegExp engine (ECMAScript flavor) and executed against the test text as you type. Matches are highlighted in place, listed with their index and capture groups, and the optional replacement field previews String.replace with full $1 / $<name> substitution support.

new RegExp(pattern, "gimsuy")

Frequently asked questions

Which regex flavor is this?

JavaScript (ECMAScript) — the same engine as Node.js and every browser. Most PCRE patterns work unchanged, but lookbehind and Unicode property escapes may differ from Python or PHP flavors. Everything runs locally in your browser.

What do the flags mean?

g finds all matches instead of the first; i ignores case; m makes ^ and $ match per line; s lets . match newlines; u enables full Unicode handling; y anchors each match to where the last one ended.

Why can some patterns hang the page?

Patterns with nested quantifiers like (a+)+ can trigger catastrophic backtracking — the engine tries exponentially many paths before giving up. The tester caps match counts, but a single evaluation of such a pattern can still freeze the tab. Prefer possessive-style rewrites like a+ or more specific character classes.

Last updated: 7 July 2026

More tools

Runs entirely in your browser — nothing you enter is uploaded. DevMint · MintKit