Comprehensive Regex Tester
Test, debug, and generate regular expressions with real-time matching, syntax validation, and comprehensive pattern templates.
Regex Pattern & Test
Enter your regular expression and test string
Test Results
Live regex matching results and analysis
Pattern Generator
Common regex patterns for various use cases
Email Address
Matches valid email addresses
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Example: user@example.com
Phone Number (US)
Matches US phone numbers in various formats
\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})Example: (123) 456-7890
URL
Matches HTTP and HTTPS URLs
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)Example: https://www.example.com
IPv4 Address
Matches valid IPv4 addresses
\b(?:(?: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]?)\bExample: 192.168.1.1
Credit Card
Matches major credit card formats
\b(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13}|3[0-9]{13}|6(?:011|5[0-9]{2})[0-9]{12})\bExample: 4111-1111-1111-1111
Strong Password
At least 8 chars with uppercase, lowercase, number, and special char
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$Example: MyPass123!
Hex Color
Matches hex color codes
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$Example: #FF5733
UUID
Matches UUID format
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Example: 550e8400-e29b-41d4-a716-446655440000
Date (MM/DD/YYYY)
Matches MM/DD/YYYY or MM-DD-YYYY format
^(0[1-9]|1[012])[\/\-](0[1-9]|[12][0-9]|3[01])[\/\-](19|20)\d\d$Example: 12/31/2023
Time (12-hour)
Matches 12-hour time format
^(1[012]|[1-9]):[0-5][0-9](\s)?(am|pm|AM|PM)$Example: 2:30 PM
Frequently Asked Questions
Common questions about regular expressions and testing