πŸ” Regex Tester & Builder

Live JavaScript regex testing with match highlighting and capture-group breakdown. Type a pattern, watch matches glow in your test text in real time.

/ /

Matches

Type a pattern to see matches.

πŸ“š Regex cheat sheet

.any char except newline (or any char with s flag)
\d \Ddigit / non-digit
\w \Wword char / non-word
\s \Swhitespace / non-whitespace
^ $line start / end (with m flag) β€” else string start/end
\b \Bword boundary / non-boundary
x* x+ x?0+, 1+, 0 or 1
x{n} x{n,m}exactly n, between n and m
x*? x+?non-greedy
[abc] [^abc]char class / negated
[a-z]range
(abc)capture group
(?:abc)non-capturing group
(?<name>abc)named group
(?=abc) (?!abc)lookahead / negative
(?<=abc) (?<!abc)lookbehind / negative
a|balternation
\1 \2backreference

🧰 Related developer tools