REX
Regex Tester
live matching · capture groups · explanation
← All Tools
/
/
✖
0 matches
0 groups
Test String
Clear
Explanation
Matches
Type a regex above to see an explanation.
No matches yet.
▶
Quick Reference
Anchors
^
Start of string / line
$
End of string / line
\b
Word boundary
\B
Non-word boundary
Character Classes
\d
Digit [0-9]
\w
Word char [a-zA-Z0-9_]
\s
Whitespace
.
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|b
Match a or b