Regex Tester

Test regular expressions with live matching, group extraction, and a handy cheat sheet

/ /
Test String
Match Result
Matches will be highlighted here...
Match Details
Match details will appear here...
Cheat Sheet
Character Classes
. Any character
\w Word character
\d Digit
\s Whitespace
\W Not word char
\D Not digit
[abc] Character set
[^abc] Negated set
[a-z] Range
Quantifiers
* 0 or more
+ 1 or more
? 0 or 1
{n} Exactly n
{n,} n or more
{n,m} Between n and m
*? 0+ (lazy)
+? 1+ (lazy)
Anchors
^ Start of string
$ End of string
\b Word boundary
\B Not word boundary
Groups & Lookaround
(abc) Capture group
(?:abc) Non-capturing
(?=abc) Lookahead
(?!abc) Neg lookahead
(?<=abc) Lookbehind
(?<!abc) Neg lookbehind
(?<name>) Named group
a|b Alternation
Common Patterns
Email
URL
IPv4
Hex Color

Your data stays private. All processing happens locally in your browser. What you enter is never collected, stored, or sent to any server.