All Tools
About
Contact
Back
Regex Tester
Test and debug regular expressions with real-time matching and highlighting.
Regular Expression Pattern
Pattern
g
i
m
s
u
y
Global - Find all matches
Test String
0 characters
Clear
Common Patterns
Email
Validates email address format
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
URL
Matches HTTP/HTTPS URLs
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)
Phone (US)
US phone number format
^\+?1?[-. ]?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$
Credit Card
Credit card number (16 digits)
^[0-9]{4}[- ]?[0-9]{4}[- ]?[0-9]{4}[- ]?[0-9]{4}$
Date (MM/DD/YYYY)
Date in MM/DD/YYYY format
^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/([0-9]{4})$
IPv4 Address
IPv4 address validation
^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Password (Strong)
Strong password: 8+ chars, upper, lower, number, special
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Hex Color
Hexadecimal color code
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
Time (24h)
Time in 24-hour format
^([01]?[0-9]|2[0-3]):[0-5][0-9]$
Alphanumeric
Only letters and numbers
^[a-zA-Z0-9]+$