Regex Generator
Generate common regular expressions for validation, text processing, and more
Email Address
Validates email addresses with common formats
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Examples: [email protected], [email protected]
US Phone Number
Validates US phone numbers in various formats
^(\+1[-\s]?)?\(?([0-9]{3})\)?[-\s]?([0-9]{3})[-\s]?([0-9]{4})$
Examples: (555) 123-4567, +1-555-123-4567, 555.123.4567
URL/Website
Validates HTTP and HTTPS URLs
^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$
Examples: https://example.com, http://www.site.org/path
IPv4 Address
Validates IPv4 addresses
^(?:(?: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]?)$
Examples: 192.168.1.1, 10.0.0.1, 255.255.255.255
Credit Card Number
Validates credit card numbers (with optional spaces/dashes)
^(?: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})$
Examples: 4111111111111111, 5555555555554444
Usage Tips: These regex patterns are designed for common use cases. Always test thoroughly with your specific requirements. Some patterns may need modification for different programming languages or specific validation needs.