Regex Pattern Generator
Build regex visually with live testing and code export.
Presets
Email
URL
Phone
Date (YYYY-MM-DD)
IPv4
Hex Color
Credit Card
Anchors & Flags
^ Start anchor
$ End anchor
Case insensitive (i)
Multiline (m)
Global (g)
Add Token
Character Class
\\d Digits
\\D Non-digit
\\w Word
\\W Non-word
\\s Whitespace
\\S Non-whitespace
. Any char
Add [custom]
Add literal
Quantifier (applies to next token, or last token if none selected)
* (0+)
+ (1+)
? (0-1)
Exact {n}
Range {n,m}
Group
Capturing ( )
Non-capturing (?: )
Lookahead (?= )
Lookbehind (?<= )
Generated Regex
Copy Regex
Clear All
Add tokens above to build your regex.
Test String
user@example.com and test@domain.org are emails
Export
JavaScript — new RegExp(...)
String literal
Copy JS Code
Copy as String
Export .txt
Copied!