🔍
Developer Tool
Regex Tester
Test regular expressions in real time. See matches highlighted, capture groups extracted, and positions displayed — all in your browser.
/
/
Common Patterns
Match Preview
Quick Reference
.
Any character except newline
\d
Digit [0-9]
\D
Non-digit
\w
Word char [a-zA-Z0-9_]
\W
Non-word character
\s
Whitespace
\S
Non-whitespace
^
Start of string/line
$
End of string/line
*
Zero or more (greedy)
+
One or more (greedy)
?
Zero or one (optional)
{n,m}
Between n and m times
[abc]
Character class
[^abc]
Negated character class
(abc)
Capture group
(?:…)
Non-capturing group
(?<n>…)
Named capture group
a|b
Alternation (a or b)
\b
Word boundary
(?=…)
Lookahead (positive)
(?!…)
Lookahead (negative)
(?<=…)
Lookbehind (positive)
(?<!…)
Lookbehind (negative)