Regex Tester
Test a regular expression against your text, highlight matches and groups, and preview a replace. Free, in your browser.
Quick reference
\ddigit 0–9\wword char (a–z 0–9 _)\swhitespace.any char[abc]a, b or c[^abc]not a/b/c^start of string/line$end of string/line\bword boundary*0 or more+1 or more?0 or 1{n}exactly n{n,}n or more{n,m}n to m*?lazy (fewest)(…)capture group(?:…)non-capturing(?<name>…)named group\1backreferencea|ba or bgglobaliignore casemmultilinesdotalluunicodeysticky2 matches
🔒 Matched in your browser with the native regex engine — your text is never uploaded.
Test regular expressions live
Type a pattern and some test text and every match is highlighted instantly, with capture groups listed and a live match count. Toggle case-insensitive, multiline and dotall flags. Invalid patterns show a clear error instead of failing silently. It uses your browser's native regex engine (JavaScript flavor), so your text never leaves your device.
Frequently asked questions
Which regex flavor is this?
JavaScript's built-in regular expressions — the same engine used by Node.js and every browser.
Can I see capture groups?
Yes — each match lists its numbered capture groups, and empty groups are shown clearly.
Can I test a find-and-replace?
Yes — type a replacement (with $1, $2 group references) and see the replaced text update live, ready to copy.
Is my text uploaded?
No. Matching runs entirely in your browser.