Developer Tools
Regex Tester & Debugger
Build and debug regular expressions with live match highlighting, capture groups and a replace preview. Uses the JavaScript regex engine, supports every flag, and runs entirely in your browser.
Regex quick reference
\ddigit\wword char\swhitespace.any (not \n)^start$end*0 or more+1 or more?0 or 1{n,m}n to m times[abc]set[^abc]not in set(…)group(?<n>…)named group(?:…)non-capturinga|balternation\bword boundary(?=…)lookahead(?<=…)lookbehind\1backreferenceStop guessing whether your pattern works
Regular expressions are powerful but unforgiving — one wrong quantifier and you match too much or nothing at all. This tester gives instant visual feedback: every match is highlighted in your text as you type, with capture groups broken out and a live preview of what a replace would produce.
What you can do
- Live highlighting — see exactly what matches as you edit.
- Capture & named groups — inspect every group per match.
- All flags — toggle g, i, m, s, u and y with one click.
- Replace preview — test substitutions with
$1/$<name>. - Cheat sheet — the common tokens, one click away.
Frequently asked questions
Which regex flavor does this use?
It uses the JavaScript (ECMAScript) regular expression engine built into your browser, so it matches exactly what RegExp does in Node.js and front-end code. All flags are supported: g (global), i (ignore case), m (multiline), s (dotall), u (unicode), and y (sticky).
Does it support capture groups and named groups?
Yes. Every match lists its numbered capture groups, and named groups written as (?<name>…) are shown by name. In replace mode you can reference them with $1, $2 or $<name>.
Why does my pattern not match across lines?
By default . does not match newlines and ^ / $ match the whole string boundaries. Enable the s flag so . matches newlines, and the m flag so ^ and $ match at the start and end of each line.
Is my test data sent anywhere?
No. The pattern and text are evaluated locally in your browser with the native RegExp engine. Nothing is uploaded or stored.