Regex Tester
Test, debug, and visualize regular expressions with live highlighting and capture groups.
//g
Flags:
Matches: 0
Groups: 0
Time: 0ms
Matches will be highlighted here...
Match Results
No matches yet. Enter a pattern and test string above.
Replace Mode
Replaced output will appear here...
Common Patterns Library
Click any pattern to load it into the tester.
Regex Cheat Sheet
Characters
.Any character (except newline)\dDigit [0-9]\DNon-digit\wWord char [a-zA-Z0-9_]\WNon-word char\sWhitespace\SNon-whitespace\bWord boundaryQuantifiers
*0 or more+1 or more?0 or 1 (optional){n}Exactly n times{n,}n or more times{n,m}Between n and m times*?Lazy 0 or more+?Lazy 1 or moreGroups & More
(abc)Capture group(?:abc)Non-capture group(?<n>)Named groupa|bAlternation (or)[abc]Character class[^abc]Negated class^Start of string/line$End of string/line