Regex Generator
Generate common regex patterns from descriptions
Generate common regex patterns from descriptions
Select a common regex pattern to use. Click to view details, or copy directly.
Matches email addresses
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Matches HTTP/HTTPS URLs
https?://[\w\-._~:/?#\[\]@!$&'()*+,;=%]+Matches US phone numbers
\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}Matches IPv4 addresses
\b(?:\d{1,3}\.){3}\d{1,3}\bMatches ISO date format
\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])Matches hex color codes
#(?:[0-9a-fA-F]{3}){1,2}\bMatches HTML/XML tags
</?[a-zA-Z][^>]*>Matches lines with only digits
^\d+$Matches credit card numbers
\b(?:\d[ -]*?){13,16}\bMatches US Social Security numbers
\b\d{3}-\d{2}-\d{4}\bMatches US ZIP codes
\b\d{5}(?:-\d{4})?\bAlphanumeric usernames (3-20 chars)
^[a-zA-Z0-9_]{3,20}$