← Back to Home

🔣 Regex Tester

Test regular expressions against real text with live match highlighting, capture group details, and a replace preview — plus a built-in quick reference for regex syntax.

/ /

Highlighted matches

Match details

Replace


    

Quick reference

. any char
\d digit · \D non-digit
\w word char · \W non-word
\s whitespace · \S non-space
[abc] char set · [^abc] negated
^ start · $ end · \b word boundary
* 0+ · + 1+ · ? 0 or 1
{n} exactly n · {n,m} n to m
*? lazy quantifier
(x) group · (?:x) non-capturing
(?<name>x) named group
a|b alternation
(?=x) lookahead · (?!x) negative
(?<=x) lookbehind · (?<!x) negative

How to Use This Regex Tester

Type a pattern between the slashes and toggle flags (g, i, m, s) to control how it matches. Matches highlight directly in your test string as you type, and Match Details breaks down each match and its capture groups individually.

Use the Replace field to preview a find-and-replace using capture group references like $1 or named groups like $<name>. Scroll up to the Quick Reference for a cheat sheet of common regex syntax if you need a reminder.