Regex Library
Collection of 20+ commonly used regex patterns: email, URL, IP, date, UUID, JWT, phone, and more. One-click copy.
Validation
Standard email address
^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$e.g. user@example.com
HTTP/HTTPS URL
^https?:\/\/[\w\-]+(\.[\w\-]+)+[\w\-.,@?^=%&:/~+#]*$e.g. https://example.com/path
IPv4 address
^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$e.g. 192.168.1.1
IPv6 address (full)
^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334
E.164 international phone
^\+?[1-9]\d{1,14}$e.g. +33612345678
Domain name
^[a-zA-Z0-9][a-zA-Z0-9-]*\.[a-zA-Z]{2,}$e.g. example.com
Date/Time
YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$e.g. 2026-01-15
DD/MM/YYYY
^\d{2}/\d{2}/\d{4}$e.g. 15/01/2026
HH:MM 24-hour
^([01]\d|2[0-3]):[0-5]\d$e.g. 14:30
ISO 8601 datetime
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}e.g. 2026-01-15T14:30:00Z
Format
#RGB or #RRGGBB
^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$e.g. #ff5733
UUID v4 format
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$e.g. 550e8400-e29b-41d4-a716-446655440000
Semantic versioning
^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$e.g. 2.1.0-beta.1
URL-safe slug
^[a-z0-9]+(-[a-z0-9]+)*$e.g. my-blog-post
JSON Web Token
^eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$e.g. eyJhbGci...
Valid JSON string
^"(?:[^"\\]|\\.)*"$e.g. "hello \"world\""
Finance
16-digit card number
^\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$e.g. 4111 1111 1111 1111
Security
Min 8 chars, upper+lower+digit+special
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$e.g. Str0ng!Pw
Web
Match HTML tags
<\/?[a-z][\s\S]*?>e.g. <div class='x'>
Network
Network MAC address
^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$e.g. 00:1A:2B:3C:4D:5E