🔍 Regular Expression Generator
Create, test, and validate regular expressions with ease
📝 Pattern Builder
⚡ Generated Pattern
Your generated regex will appear here…
🧪 Test Your Regex
📚 Common Patterns
Click on any pattern below to use it:
Email Address
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
US Phone Number
^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$
Date (MM/DD/YYYY)
^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/(19|20)\d\d$
US ZIP Code
^\d{5}(-\d{4})?$
IPv4 Address
^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$
URL
^https?://…
Strong Password
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)…
Username
^[a-zA-Z0-9_]+$
💡 Pattern Explanation
Understanding your regular expression:
Enter or generate a regex pattern to see its explanation here.
📖 Regular Expression Cheatsheet
Character Classes
.
Any character except newline
\d
Any digit (0-9)
\w
Any word character
\s
Any whitespace
[abc]
Any of a, b, or c
[^abc]
Not a, b, or c
Quantifiers
*
0 or more
+
1 or more
?
0 or 1
{3}
Exactly 3
{3,}
3 or more
{3,5}
3, 4, or 5
Anchors
^
Start of string
$
End of string
\b
Word boundary
\B
Not word boundary
Groups & Lookaround
(abc)
Capture group
(?:abc)
Non-capture group
(?=abc)
Positive lookahead
(?!abc)
Negative lookahead
a|b
a or b