Regex Tester
Test regular expressions live: matches highlight as you type, capture groups are listed, and you can preview replacements. Pure JavaScript — your text never leaves the browser.
How it works
This tool uses your browser's own JavaScript regex engine, so results match what you'd get in Node, Deno, or VS Code search. Matches update on every keystroke. Flags follow the standard meanings: g finds every match instead of stopping at the first, i ignores case, m makes ^/$ match line edges, s lets . cross newlines, u enables proper Unicode handling (needed for \p{…}), and y (sticky) anchors the search to the current position.
New to regex? Start with the one-page Regex Quick Reference — it covers every token this tester accepts.
Frequently asked questions
Why did my pattern hang or run slowly?
Nested quantifiers like (a+)+ or (.*)* can cause catastrophic backtracking — the engine tries exponentially many splits. Rewrite with a negated class ([^\"]*) or atomic-group-style constraints instead.
Why does the same pattern work in Python but not here?
JavaScript is its own regex flavor. Most syntax is shared, but lookbehind ((?<=…)) is newer, and \p{…} Unicode properties require the u flag.
Does my text get uploaded anywhere?
No. Pattern and text are tested in JavaScript on your device; the page works offline once loaded.