Regex Tester live matching · capture groups · explanation

← All Tools
/ /
0 matches 0 groups
Test String
Type a regex above to see an explanation.
No matches yet.
Quick Reference
Anchors
^Start of string / line
$End of string / line
\bWord boundary
\BNon-word boundary
Character Classes
\dDigit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace
.Any char (except \n)
[abc]One of a, b, or c
[^abc]Not a, b, or c
[a-z]Character in range
Quantifiers
*0 or more (greedy)
+1 or more (greedy)
?0 or 1 (optional)
*?0 or more (lazy)
{n}Exactly n times
{n,m}Between n and m
Groups & Lookaround
(...)Capture group
(?:...)Non-capturing group
(?=...)Positive lookahead
(?!...)Negative lookahead
(?<=...)Positive lookbehind
(?<!...)Negative lookbehind
a|bMatch a or b