Regex Tester

Test and debug regular expressions with real-time matching and syntax highlighting.

/ /
No matches found

No matches found

Examples

Cheat Sheet

. Any character
\d Digit [0-9]
\D Non-digit
\w Word [A-Za-z0-9_]
\W Non-word
\s Whitespace
\S Non-whitespace
^ Start of line
$ End of line
\b Word boundary
* 0 or more
+ 1 or more
? 0 or 1
{n} Exactly n
{n,} n or more
{n,m} Between n and m
[abc] Character set
[^abc] Negated set
(abc) Capture group
a|b Alternation
(?:abc) Non-capture group
(?=abc) Positive lookahead
(?!abc) Negative lookahead
← Back to Home