Email Validation
^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$
Matches standard email addresses.
URL Validation
^https?:\/\/[^\s/$.?#].[^\s]*$
Matches HTTP and HTTPS URLs.
Phone (US) Validation
^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
Matches US phone numbers in various formats.
Phone (Intl) Validation
^\+?[1-9]\d{1,14}$
Matches international phone numbers (E.164).
IP Address (v4) Validation
^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$
Matches valid IPv4 addresses.
IP Address (v6) Validation
^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$
Matches full IPv6 addresses.
MAC Address Validation
^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$
Matches MAC addresses with colon or hyphen separators.
Credit Card Validation
^(?:4\d{12}(?:\d{3})?|5[1-5]\d{14}|3[47]\d{13}|6(?:011|5\d{2})\d{12})$
Matches Visa, MasterCard, Amex, and Discover numbers.
SSN Validation
^\d{3}-?\d{2}-?\d{4}$
Matches US Social Security Numbers.
Zip Code (US) Validation
^\d{5}(-\d{4})?$
Matches US ZIP codes with optional +4 extension.
Date (YYYY-MM-DD) Validation
^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$
Matches ISO 8601 date format.
Date (MM/DD/YYYY) Validation
^(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12]\d|3[01])\/\d{4}$
Matches US date format.
Time (24h) Validation
^([01]\d|2[0-3]):[0-5]\d$
Matches 24-hour time format (HH:MM).
Time (12h) Validation
^(0?[1-9]|1[0-2]):[0-5]\d\s?[AaPp][Mm]$
Matches 12-hour time format with AM/PM.
Hex Color Validation
^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$
Matches 3 or 6 digit hex color codes.
UUID Validation
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Matches UUID v1 through v5.
Semantic Version Validation
^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
Matches semantic versioning strings (semver).
HTML Tags Web
<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s[^>]*)?\/?>
Matches opening and closing HTML tags.
URL Slug Web
^[a-z0-9]+(?:-[a-z0-9]+)*$
Matches URL-safe slugs (lowercase, hyphens).
Domain Name Web
^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$
Matches domain names.
HTTP(S) URL Web
^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$
Matches full HTTP/HTTPS URLs with path and query.
Query String Params Web
[?&]([^=&]+)=([^&]*)
Captures key-value pairs from query strings.
JWT Token Web
^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+$
Matches JSON Web Token structure.
Base64 String Web
^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$
Matches Base64-encoded strings.
Integer Numbers
^-?\d+$
Matches positive and negative integers.
Decimal Numbers
^-?\d+\.\d+$
Matches decimal numbers.
Percentage Numbers
^-?\d+(?:\.\d+)?%$
Matches percentage values.
Currency (USD) Numbers
^\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?$
Matches US dollar amounts.
Scientific Notation Numbers
^-?\d+(?:\.\d+)?[eE][+-]?\d+$
Matches numbers in scientific notation.
Comma-separated Number Numbers
^\d{1,3}(,\d{3})*(\.\d+)?$
Matches numbers with comma thousands separators.
Alphanumeric Strings
^[a-zA-Z0-9]+$
Matches strings containing only letters and digits.
No Special Chars Strings
^[a-zA-Z0-9\s]+$
Matches strings with letters, digits, and spaces only.
Password Strength Strings
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*]).{8,}$
Requires 8+ chars, upper, lower, digit, and special char.
Whitespace Only Strings
^\s+$
Matches strings containing only whitespace.
Trim Whitespace Strings
^\s+|\s+$
Matches leading and trailing whitespace.
Duplicate Words Strings
\b(\w+)\s+\1\b
Finds consecutive duplicate words.
CamelCase Strings
^[a-z][a-zA-Z0-9]*$
Matches lowerCamelCase identifiers.
snake_case Strings
^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$
Matches snake_case identifiers.
kebab-case Strings
^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$
Matches kebab-case identifiers.
CSS Hex Color Code
#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\b
Matches CSS hex colors including alpha.
Import Statements Code
^import\s+.*\s+from\s+['"][^'"]+['"];?$
Matches ES module import statements.
HTML Comments Code
<!--[\s\S]*?-->
Matches HTML comment blocks.
TODO Comments Code
\/\/\s*(?:TODO|FIXME|HACK|XXX)\b.*$
Matches TODO, FIXME, HACK, and XXX comments.
JSON Key Code
"([^"]+)"\s*:
Matches quoted JSON object keys.
Function Declaration Code
function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(
Matches named function declarations.