Regex Pattern Builder
Build, test, and debug regular expressions visually. Real-time match highlighting, pattern explanation, and code export. Everything runs in your browser.
/
/
g
Type a pattern and test string above...
No matches yet.
Regex Quick Reference
Character Classes
. Any character (except newline)\d Digit [0-9]\D Non-digit\w Word char [a-zA-Z0-9_]\W Non-word char\s Whitespace\S Non-whitespace[abc] Character set[^abc] Negated set
Quantifiers
* 0 or more+ 1 or more? 0 or 1{n} Exactly n{n,} n or more{n,m} Between n and m*? Lazy 0 or more+? Lazy 1 or more
Anchors & Boundaries
^ Start of string/line$ End of string/line\b Word boundary\B Non-word boundary
Groups
(abc) Capturing group(?:abc) Non-capturing(?<name>abc) Named groupa|b Alternation
Lookaround
(?=abc) Positive lookahead(?!abc) Negative lookahead(?<=abc) Positive lookbehind(?<!abc) Negative lookbehind