← Back to tools

Regex Tester

Build and debug regular expressions with live highlighting, flag toggles, capture groups, and an optional replace mode.

/ /

Test string

Replace

Match details

No matches yet.

Cheat sheet

\d digit · \D non-digit
\w word char · \W non-word
\s whitespace · \S non-ws
. any (except \n) · [abc] char class
^ start · $ end
\b word boundary · \B non-boundary
? 0–1 · * 0+ · + 1+
{n} exactly n · {n,m} n–m
(abc) group · (?:abc) non-capture
(?<name>…) named · \1 backref
(?=x) lookahead · (?!x) negative
a|b alternation