Back to Tools

Regex Tester

Test and debug regular expressions in real-time. See matches highlighted instantly. All processing happens in your browser.

//g

Regex Quick Reference

Characters

.Any character except newline
\dDigit (0-9)
\wWord character (a-z, A-Z, 0-9, _)
\sWhitespace
[abc]Any of a, b, or c
[^abc]Not a, b, or c

Quantifiers

*0 or more
+1 or more
?0 or 1
{n}Exactly n times
{n,m}Between n and m times

Anchors

^Start of string/line
$End of string/line
\bWord boundary

Groups

(abc)Capture group
(?:abc)Non-capture group
(?<name>abc)Named capture group
a|bMatch a or b