Tools

Regex Tester

Test regular expressions with live match highlighting.

//
Quick reference
.Any char (except newline)
\dDigit [0-9]
\wWord char [A-Za-z0-9_]
\sWhitespace
\bWord boundary
^Start of string / line
$End of string / line
*0 or more
+1 or more
?0 or 1 (optional)
{n,m}Between n and m times
(abc)Capture group
(?:abc)Non-capturing group
(?<n>abc)Named group
a|ba or b
[abc]Character class
[^abc]Negated class
\p{L}Unicode letter (u flag)