Regex Tester
Test, debug, and visualize regular expressions in real-time.
Error:
Pattern
Test String
Matches:
Results
No matches found. Enter a pattern and test string above.
Match
Index:
Groups:
$:
Matches:
Groups:
Pattern: chars
Regex Cheat Sheet
Character Classes
.Any character\dDigit [0-9]\wWord char\sWhitespace[abc]a, b, or c[^abc]Not a, b, c
Anchors
^Start of string$End of string\bWord boundary\BNot word boundary
Quantifiers
*0 or more+1 or more?0 or 1{n}Exactly n{n,}n or more{n,m}Between n and m
Groups
(abc)Capture group(?:abc)Non-capture(?=abc)Lookahead(?!abc)Neg lookahead(?<=abc)Lookbehind(?<!abc)Neg lookbehind