Email Address
^[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}$
Validates most real-world email addresses. Not RFC 5322 complete but handles 99% of cases.
β hello@example.com β user.name+tag@domain.co.uk
URL (http/https)
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&\/=]*)
Matches http and https URLs with optional www, path, query string.
β https://example.com/path?q=test
US Phone Number
\+?1?\s*\(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]?\d{4}
Matches common US phone formats: dashes, dots, spaces, parentheses, optional country code.
β 415-555-0182 β (650) 555-9041 β +1 800 555 1234
Date (YYYY-MM-DD or YYYY/MM/DD)
\d{4}[-\/]\d{2}[-\/]\d{2}
ISO 8601 date format. Accepts dash or slash separator.
β 2024-05-30 β 2024/01/01
IPv4 Address
^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$
Validates IPv4 addresses with proper range checking (0β255 per octet).
β 192.168.1.1 β 256.0.0.1
Hex Color
#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})\b
CSS hex color codes β 3 or 6 digit shorthand.
β #ff6b6b β #abc β #FFFFFF
URL Slug
^[a-z0-9]+(?:-[a-z0-9]+)*$
Valid URL slugs β lowercase letters, digits, hyphens. No leading/trailing hyphens.
β hello-world β slug-123 β Invalid Slug
Strong Password
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Requires: 1 lowercase, 1 uppercase, 1 digit, 1 special character, 8+ chars minimum.
β Password1! β weakpass β NoSpecial1