^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Standard email validation.
^[a-zA-Z][a-zA-Z0-9_-]{2,19}$
Alphanumeric username, 3–20 characters, starts with a letter.
^[A-Za-z\u00C0-\u017F][A-Za-z\u00C0-\u017F'\- ]+$
Full name with Unicode letters, apostrophes, and hyphens.
^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
North American phone in any common format.
^\+[1-9]\d{6,14}$
The international standard: + and 7–15 digits.
^https?://[^\s/$.?#].[^\s]*$
HTTP or HTTPS URL with optional path, query, and fragment.
^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.[A-Za-z0-9-]{1,63…
Bare domain with optional subdomain.
^[a-z0-9]+(?:-[a-z0-9]+)*$
Lowercase URL slug — letters, digits, hyphens.
#[A-Za-z][A-Za-z0-9_]*
Social media hashtag — # followed by letters/digits/underscore.
@[A-Za-z][A-Za-z0-9_]{1,29}
@-mention in social media or chat — @ followed by username.
^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-…
IPv4 address with octet range validation.
^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA…
IPv6 address with abbreviations supported.
^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$
MAC address with colon or hyphen separators.
^[0-9a-fA-F]{4}\.[0-9a-fA-F]{4}\.[0-9a-fA-F]{4}$
Cisco-style dotted MAC: XXXX.XXXX.XXXX.
@([A-Za-z0-9_]{1,15})\b
Twitter @handle — 1-15 alphanumeric/underscore.
^@?[a-zA-Z0-9._]{1,30}$
Instagram username — letters, digits, dots, underscores.
^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,3…
GitHub username — alphanumeric + single hyphen, no leading/trailing hyphen.
^[A-Za-z0-9_-]{11}$
11-character YouTube video identifier.
^https?:\/\/(www\.)?linkedin\.com\/in\/[A-Za-z0-…
linkedin.com/in/handle URL.
^[a-z0-9._]{2,32}$
Discord username — 2-32 lowercase letters/digits/dot/underscore.
^spotify:(track|album|playlist|artist|episode|sh…
spotify:track/album/playlist URI.
^.+(\s+(ext\.?|x|extension)\s*\d+)$
Phone number followed by ext./x and digits.
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
The international date format.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-…
Full ISO datetime with optional fractional seconds and timezone.
^(0[1-9]|1[0-2])/(0[1-9]|[12]\d|3[01])/\d{4}$
Slash-separated US date format.
^(0[1-9]|[12]\d|3[01])/(0[1-9]|1[0-2])/\d{4}$
Day-first date format used in most of the world.
^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$
Time in 24-hour format with optional seconds.
^(0?[1-9]|1[0-2]):[0-5]\d\s?(AM|PM|am|pm)$
12-hour time with AM/PM marker.
^[+-](0\d|1[0-4]):?[0-5]\d$
UTC offset in ±HH:MM or ±HHMM format.
^P(?!$)(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\…
Duration like P1Y2M3DT4H5M6S.
^\d{10}$
10-digit Unix epoch in seconds.
^\d{13}$
13-digit Unix epoch in milliseconds.
^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{1,2} (Jan|Feb…
Email-style date format like RFC 2822.
^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])-[1-7]$
YYYY-Www-D format ISO week date.
^(January|February|March|April|May|June|July|Aug…
English month name, full or abbreviated.
^(Monday|Tuesday|Wednesday|Thursday|Friday|Satur…
English day name, full or abbreviated.
^(Q[1-4][\s\-/]?\d{4}|\d{4}[\s\-/]?Q[1-4])$
Quarter format like Q1 2024 or 2024-Q1.
^(\*|[0-5]?\d|\*\/\d+|[0-5]?\d-[0-5]?\d|[0-5]?\d…
Standard 5-field cron: minute hour day month weekday.
^(0|[1-9]\d*)$
Non-negative whole number, no leading zeros.
^-?(0|[1-9]\d*)$
Integer with optional minus sign.
^-?\d+(\.\d+)?$
Decimal with optional sign and fractional part.
^\$?-?\d{1,3}(,\d{3})*(\.\d{2})?$
Dollar amount with optional cents and commas.
^-?\d+(\.\d+)?[eE][+-]?\d+$
Numbers in scientific notation like 6.022e23.
^[A-Za-z]+$
String of letters only (A–Z, a–z).
^[A-Za-z0-9]+$
Letters and digits only, no spaces or symbols.
\s+
Match runs of whitespace for trimming or collapsing.
(["\'])(?:(?=(\\?))\2.)*?\1
Match either single- or double-quoted strings.
BEGIN(.*?)END
Extract content between two known markers.
[\u{1F300}-\u{1F9FF}\u{2600}-\u{27BF}]
Match common Unicode emoji characters.
^\d+(\.\d+)?$
Non-negative decimal number, optional fraction.
^(100(\.0+)?|\d{1,2}(\.\d+)?)\s*%?$
Percentage value with optional decimals and % sign.
^€?\s?-?\d{1,3}([.,]\d{3})*([.,]\d{2})?\s?€?$
Euro amount in €1,234.56 or 1.234,56 € format.
^£?-?\d{1,3}(,\d{3})*(\.\d{2})?$
British pound amount like £1,234.56.
^¥?-?\d{1,3}(,\d{3})*$
Yen amount like ¥1,234 (no decimal places).
^-?\d+\/\d+$
Simple fraction like 1/2, 3/4, 22/7.
^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?…
Standard Roman numerals (I, IV, IX, X, etc.).
^\d+(st|nd|rd|th)$
Ordinals like 1st, 2nd, 3rd, 21st.
^0[xX][0-9a-fA-F]+$
C/JS style hex literal: 0xABC123.
^0[bB][01]+$
Binary literal: 0b101010.
^0[oO][0-7]+$
Modern octal literal: 0o755.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9…
Standard UUID in 8-4-4-4-12 hex format.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89…
Random-generated UUID version 4.
^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0…
Semver version like 1.2.3 with pre-release and build metadata.
^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*$
JSON Web Token — three base64url segments.
^[A-Za-z0-9+/]+={0,2}$
Base64-encoded data with optional padding.
\b[0-9a-f]{7}\b
7-character abbreviated commit hash.
\b[0-9a-f]{40}\b
Full 40-character SHA-1 commit hash.
^[0-9a-fA-F]{32}$
32-character MD5 hash.
^[0-9a-fA-F]{40}$
40-character SHA-1 hash.
^[0-9a-fA-F]{64}$
64-character SHA-256 hash.
^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})…
CSS hex color — 3, 4, 6, or 8 hex digits.
^(?=(?:\D*\d){9}[\dX])\d{1,5}-?\d{1,7}-?\d{1,6}-?[…
10-digit International Standard Book Number.
^(?=(?:\D*\d){13})97[89][\d-]+$
13-digit International Standard Book Number.
^rgba?\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*(,\s*(0|1|0…
CSS rgb(r, g, b) or rgba(r, g, b, a) value.
^hsla?\(\s*\d+(deg)?\s*,\s*\d+%\s*,\s*\d+%\s*(,\…
CSS hsl/hsla color value.
^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$
P2PKH or P2SH Bitcoin address — starts with 1 or 3.
^(bc1)[02-9ac-hj-np-z]{38,87}$
bc1... Bitcoin SegWit address.
^0x[a-fA-F0-9]{40}$
0x + 40 hex characters Ethereum address.
^[1-9A-HJ-NP-Za-km-z]{32,44}$
Base58 encoded Solana wallet address (32-44 chars).
-----BEGIN [A-Z ]+-----[\s\S]+?-----END [A-Z ]+-…
BEGIN ... END envelope of a PEM file.
^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp\d+|ssh-ds…
OpenSSH format public key — ssh-rsa, ssh-ed25519, etc.
^[A-Za-z0-9_\-]{20,64}$
Common API key shape — 20-64 alphanumerics with dashes/underscores.
^([\^~>=<]+)?\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[…
npm semver range — ^1.2.3, ~1.2.3, >=1.0.0, etc.
^[0-9A-Z]{9}$
9-character CUSIP — North American security identifier.
^(?:4\d{12}(?:\d{3})?|(?:5[1-5]\d{2}|222[1-9]|22[3…
Match any major credit card brand.
^4\d{12}(\d{3})?$
Visa credit/debit card.
^(5[1-5]\d{2}|222[1-9]|22[3-9]\d|2[3-6]\d{2}|27[01…
Mastercard credit/debit card, including 2-series BINs.
^3[47]\d{13}$
Amex card — starts with 34 or 37, 15 digits total.
^6(011|5\d{2}|4[4-9]\d|22[1-9]\d{2})\d{12}$
Discover card — multiple BIN ranges.
^(508[5-9]|6069|607[0-9]|608[0-7]|6521|6522)\d{12}…
RuPay — India's domestic card network (NPCI).
^\d{3,4}$
Card verification value — 3 digits (or 4 for Amex).
^(0[1-9]|1[0-2])/\d{2}$
Two-digit month and year separated by slash.
<\/?[a-zA-Z][a-zA-Z0-9]*(\s+[a-zA-Z-]+(\s*=\s*("[^…
Match HTML opening, closing, or self-closing tags.
<!--[\s\S]*?-->
HTML <!-- comment --> block.
(\/\/|#).*$
Single-line comment in C-family or scripting languages.
\/\*[\s\S]*?\*\/
C-style multi-line comment.
^(?:\/|\.{1,2}\/)?(?:[\w.-]+\/)*[\w.-]+$
Absolute or relative Unix-style file path.
^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\…
Windows file path with drive letter.
\.([a-zA-Z0-9]+)$
Match the extension at the end of a filename.
^[a-z]+([A-Z][a-z0-9]*)*$
Lowercase first word followed by capitalized words.
^[a-z][a-z0-9]*(_[a-z0-9]+)*$
Lowercase words joined with underscores.
^[a-z][a-z0-9]*(-[a-z0-9]+)*$
Lowercase words joined with hyphens.
^[A-Z][a-zA-Z0-9]*$
Capitalized words joined with no separator.
^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$
All-uppercase with underscores.
\.[a-zA-Z_][a-zA-Z0-9_-]*
CSS class name with leading dot.
#[a-zA-Z_][a-zA-Z0-9_-]*
CSS ID with leading hash.
^[a-zA-Z]+\/[a-zA-Z0-9.+-]+$
Internet media type like application/json.
^[1-5]\d{2}$
3-digit HTTP status code.
^(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1…
TCP/UDP port — 0 to 65535.
(TODO|FIXME|HACK|XXX|NOTE)(\([^)]+\))?:\s*(.*)
TODO or FIXME comment marker in code.
\[([^\]]+)\]\(([^)]+)\)
Markdown link in [text](url) format.
!\[([^\]]*)\]\(([^)]+)\)
Markdown image in  format.
^([a-zA-Z_][\w-]*)\s*:
YAML key — alphanumeric and dashes followed by colon.
"([^"\\]|\\.)*"\s*:
Quoted JSON object key (a property name).
^[a-z0-9]+([._-][a-z0-9]+)*(/[a-z0-9]+([._-][a-z…
Docker image reference with tag, e.g. ubuntu:22.04.
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
DNS-1123 label — lowercase alphanumeric and hyphens.
\$\{?([A-Z_][A-Z0-9_]*)\}?
$VAR or ${VAR} in shell scripts.
^[A-Za-z_][A-Za-z0-9_]*=
Bash variable assignment — NAME=value.
^([A-Za-z][A-Za-z0-9-]*):\s*(.+?)\s*$
Header-Name: value format.
xmlns(:[a-zA-Z][\w-]*)?="[^"]*"
xmlns or xmlns:prefix attribute.
&(#\d+|#x[0-9a-fA-F]+|[a-zA-Z]+);
HTML named or numeric character entity.
(--[^\n]*|\/\*[\s\S]*?\*\/)
SQL line comment (--) or block comment (/* */).
^[gimsuyd]*$
Flag characters used in JS regex literals.
^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|TRACE|C…
Standard HTTP method verbs.
^2\d{2}$
200-series HTTP success status codes.
^3\d{2}$
300-series HTTP redirect status codes.
^4\d{2}$
400-series client error status codes.
^5\d{2}$
500-series server error status codes.
(?:^|[?&])([^=&]+)=([^&]*)
key=value query parameter.
%([A-Za-z_][A-Za-z0-9_]*)%
%VAR% style Windows environment variable.
^[a-z_][a-z0-9_-]*[$]?$
Standard Linux/Unix username — POSIX rules.
^(?!\/|.*([\/]\.|\/\/|@\{|\\))[^\040\177 ~^:?*\[…
Valid Git branch name — alphanumeric and limited symbols.
(?:[A-Za-z0-9.-]+\/[A-Za-z0-9.-]+)?#\d+
#123 or org/repo#123 reference.
^[^:]+:[^:]+(:(ro|rw|z|Z|cached|delegated|consis…
Docker -v host:container[:options] format.
^[2-9]\d{11}$
12-digit Indian Unique Identification number.
^[2-9]\d{3}\s\d{4}\s\d{4}$
Aadhaar displayed as 1234 5678 9012.
^X{4}\s?X{4}\s?\d{4}$
Masked Aadhaar showing only last 4 digits.
^[2-9]\d{15}$
16-digit Virtual ID — a temporary mapping to Aadhaar.
^[A-Z]{5}[0-9]{4}[A-Z]$
10-character tax ID issued by India's Income Tax Department.
^[A-Z]{3}P[A-Z][0-9]{4}[A-Z]$
PAN issued specifically to an individual (4th char is P).
^[A-Z]{4}\d{5}[A-Z]$
10-character number for entities deducting tax at source.
^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$
15-character Goods and Services Tax Identification Number.
^\d{2}(\d{2}(\d{2}(\d{2})?)?)?$
Harmonized System Nomenclature code for goods (2–8 digits).
^99\d{4}$
Services Accounting Code — 6-digit code for services under GST.
^[a-zA-Z0-9.\-_]{2,256}@[a-zA-Z][a-zA-Z]{2,64}$
Unified Payments Interface ID — username@psp.
^[A-Z]{4}0[A-Z0-9]{6}$
Indian Financial System Code — 11-character bank branch identifier.
^\d{9}$
9-digit Magnetic Ink Character Recognition code on cheques.
^\d{9,18}$
Bank account number — 9 to 18 digits.
^[6-9]\d{9}$
10-digit Indian mobile, starts with 6, 7, 8, or 9.
^(\+91[\-\s]?|0)?[6-9]\d{9}$
Indian mobile in international format.
^[1-9]\d{5}$
6-digit Indian postal PIN code.
^[A-Z]{3}\d{7}$
Election Photo Identity Card — 10 chars.
^[A-PR-WY][1-9]\d\s?\d{4}[1-9]$
Passport number issued by India — 1 letter + 7 digits.
^[A-Z]{2}[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{…
State code + RTO + series + number.
^[A-Z]{2}[\s\-]?\d{2}[\s\-]?(19|20)\d{2}[\s\-]?\d{…
State code + RTO + year + serial.
^[LU]\d{5}[A-Z]{2}\d{4}[A-Z]{3}\d{6}$
21-character ID for Indian companies registered with MCA.
^\d{8}$
8-digit ID for company directors.
^[A-Z]{3}\-\d{4}$
7-character ID for Limited Liability Partnerships.
^\d{12}$
12-digit Universal Account Number for EPF.
^\d{17}$
17-digit Employee State Insurance number.
^[1-2]\d{13}$
14-digit Food Safety license number.
^(₹|Rs\.?\s?|INR\s?)?\d{1,3}(,\d{2,3})*(\.\d{1,2})…
Rupee amount with ₹ symbol or Rs. prefix.
^\d{1,2}(,\d{2})*,\d{3}(\.\d+)?$
Number in Indian grouping: 1,00,000 not 100,000.
^MH[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Maharashtra — starts with MH.
^DL[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Delhi — starts with DL.
^KA[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Karnataka — starts with KA.
^TN[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Tamil Nadu — starts with TN.
^UP[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Uttar Pradesh — starts with UP.
^GJ[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Gujarat — starts with GJ.
^AP[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Andhra Pradesh — starts with AP.
^TS[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Telangana — starts with TS.
^RJ[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Rajasthan — starts with RJ.
^MP[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Madhya Pradesh — starts with MP.
^WB[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in West Bengal — starts with WB.
^KL[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Kerala — starts with KL.
^HR[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Haryana — starts with HR.
^PB[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Punjab — starts with PB.
^OD[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Odisha — starts with OD.
^AS[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Assam — starts with AS.
^HP[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Himachal Pradesh — starts with HP.
^UK[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Uttarakhand — starts with UK.
^JH[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Jharkhand — starts with JH.
^CG[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Chhattisgarh — starts with CG.
^BR[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\d{4}$
Vehicle plate registered in Bihar — starts with BR.
^\d{2}[\s\-]?BH[\s\-]?\d{4}[\s\-]?[A-Z]{2}$
New Bharat series — portable across states. Format: YY BH NNNN LL.
^[A-Z]{2}[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\…
EV plates have a green background — same format as regular plates.
^[A-Z]{2}[\s\-]?\d{1,2}[\s\-]?[A-Z]{1,3}[\s\-]?\…
Commercial vehicles have yellow plates — same regex as regular.
^(AN|AP|AR|AS|BR|CG|CH|DH|DL|DN|GA|GJ|HP|HR|JH|J…
Official 2-letter codes for all Indian states and union territories.
^[A-Z0-9]{10}$
10-digit code for Indian exporters and importers.
^UDYAM-[A-Z]{2}-\d{2}-\d{7}$
MSME registration number — format UDYAM-XX-NN-NNNNNNN.
^[A-Z]{2}\d{2}[A-Z]\d{7}$
Older 12-character MSME ID — superseded by Udyam.
^\d{12}$
12-digit Permanent Retirement Account Number for NPS.
^\d{13}$
13-digit Insurance Repository account number.
^\d{2}-\d{4}-\d{4}-\d{4}$
14-digit Ayushman Bharat Health Account number.
^[a-zA-Z0-9.\-_]{2,}@(abdm|sbx|[a-zA-Z][a-zA-Z0-…
Health handle — username@abdm or @sbx or @hdfc, etc.
^\d{4}/\d{5}/\d{5}\s\d{2}/\d{2}/\d{4}\s\d{2}:\d{…
28-digit enrollment ID issued at Aadhaar enrollment.
^[A-Z]{2}/[A-Z]{3}/\d{7}/\d{3}/\d{7}$
Member ID format — establishment code + member number.
^[A-Z0-9]{13,15}$
Pollution Under Control certificate — 13 to 15 alphanumeric.
^\d{2}/\d{2}/[A-Z]{2}/\d{4}/\d{4,6}$
State drug license number — varies by state.
^IN[EFA9][A-Z0-9]{9}\d$
12-char International Securities ID for Indian securities (INE/IN9 prefix).
^\d{12}$
12-digit Electronic Way Bill number for goods transport.
^\d{15}$
15-digit Income Tax Return filing acknowledgement.
^[A-Z]{2,3}/\d{4}/\d{4,8}$
Municipal trade license — varies but commonly LL/YYYY/NNNNNN.
^\d{11}$
11-digit Customer Information File number used by SBI.
^\d{8}$
8-digit customer ID used by HDFC Bank.
^\d{8}$
8-digit User/Customer ID for ICICI Bank.
^\d{9}$
Customer ID for Axis Bank — typically 9 digits.
^\d{6}$
6-digit serial cheque number from the bottom-left of an Indian cheque.
^\d{12}$
12-digit reference number for IMPS transfers.
^[A-Z]{4}[A-Z0-9]{6}\d{12}$
22-character Unique Transaction Reference for RTGS/NEFT.
^\d{7}$
7-digit MMID used for IMPS mobile-based transfers.
^(\+91[\s\-]?|0)?\d{2,4}[\s\-]?\d{6,8}$
STD code + landline — 2-4 digit STD followed by 6-8 digit number.
^1800[\s\-]?\d{2,3}[\s\-]?\d{4,7}$
1800-series toll-free number — free to caller within India.
^1860[\s\-]?\d{2,3}[\s\-]?\d{4,7}$
1860 toll-charged customer care numbers.
^1900[\s\-]?\d{2,3}[\s\-]?\d{4,7}$
1900-series premium-rate services (paid by caller at higher rate).
^1\d{9}$
10-digit Tata Play subscriber ID (formerly Tata Sky).
^\d{11}$
11-digit Viewing Card (VC) number for Dish TV.
^\d{10}$
10-digit Passenger Name Record for train bookings.
^\d{5}$
5-digit Indian Railways train number.
^[A-Z]{2,5}$
2-5 letter station code used by Indian Railways.
^[a-zA-Z][a-zA-Z0-9_]{2,9}$
IRCTC username — 3-10 alphanumeric characters.
^[A-Z0-9]{6}$
6-character PNR used by Indian domestic airlines.
^[A-Z]{2}\d{9}IN$
13-character tracking ID for India Post articles.
^E[EM]\d{9}IN$
India Post Speed Post — starts with EE/EM and ends IN.
^\d{8,11}$
Blue Dart Air Waybill — 8 to 11 digits.
^[A-Z]{1,2}\d{8,11}$
DTDC tracking — variable but commonly 9-12 alphanumeric.
^\d{7}$
7-digit CBSE Class 10/12 roll number.
^[A-Z]\d{6}$
ICSE/ISC Council unique ID — 7 digits.
^\d{12}$
12-digit NEET (medical entrance) roll number.
^\d{12}$
12-digit JEE Main/Advanced application number.
^GATE\d{9}$
13-character GATE registration number.
^\d{7}$
7-digit UPSC Civil Services examination roll number.
^\d{11}$
11-digit SSC roll number for CGL, CHSL, MTS exams.
^\d{12}$
12-digit roll number for the UGC-NET (lectureship) exam.
^\d{9}$
9-digit Life Insurance Corporation of India policy number.
^IN\d{14}$
16-digit demat account number starting IN for NSDL.
^\d{16}$
16-digit CDSL demat account — all numeric, starts with DP ID.
^\d{6}$
6-digit Bombay Stock Exchange scrip/security code.
^\d{5}(-\d{4})?$
5-digit ZIP code, optionally with 4-digit extension.
^(?!000|666|9\d{2})\d{3}-(?!00)\d{2}-(?!0000)\d{4}…
SSN with known-invalid ranges excluded.
^\d{2}-\d{7}$
Employer Identification Number, 9 digits XX-XXXXXXX.
^9\d{2}-(7\d|8[0-8]|9[0-2]|9[4-9])-\d{4}$
Individual Taxpayer ID — like SSN but starts with 9.
^\d{9}$
9-digit bank routing/ABA transit number.
^[A-Z]\d{7,8}$
1 letter + 7-8 alphanumerics — covers most state formats.
^[A-Z]{1,2}\d[A-Z\d]?\s?\d[A-Z]{2}$
UK postcode in either compact or spaced form.
^(?!BG|GB|NK|KN|TN|NT|ZZ)[A-CEGHJ-PR-TW-Z][A-CEGHJ…
NI number — 2 letters + 6 digits + 1 letter.
^\d{2}-?\d{2}-?\d{2}$
6-digit bank sort code, optionally hyphen-separated.
^(\+44\s?|0)(\d{2,5}\s?)(\d{3,4}\s?\d{3,4})$
UK phone in various common formats.
^(\+44\s?|0)7\d{3}\s?\d{6}$
UK mobile in 07XXX or +44 7XXX format.
^[A-Z]{2}\d{2}[A-Z0-9]{1,30}$
International Bank Account Number — 15 to 34 alphanumeric chars.
^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
Bank Identifier Code — 8 or 11 chars.
^(AT|BE|BG|CY|CZ|DE|DK|EE|EL|ES|FI|FR|GB|HR|HU|IE|…
EU VAT registration — 2-letter country + 8–12 alphanumerics.
^\d{11}$
11-digit German tax identification number.
^DE\d{20}$
German IBAN — DE + 20 digits.
^\d{14}$
14-digit SIRET — French business establishment ID.
^\d{9}$
9-digit SIREN — French company registration.
^\d{5}$
5-digit French postal code.
^[A-Z]{6}\d{2}[A-EHLMPRST]\d{2}[A-Z]\d{3}[A-Z]$
16-character Italian tax code.
^\d{8}[A-Z]$
Spanish national ID — 8 digits + check letter.
^[XYZ]\d{7}[A-Z]$
NIE for foreigners — X/Y/Z + 7 digits + check letter.
^\+49[\s\-]?\d{2,4}[\s\-]?\d{4,11}$
German phone with +49 country code.
^\+33[\s\-]?[1-9](\s?\d{2}){4}$
French phone with +33 prefix.
^\d{5}$
5-digit Italian Codice di Avviamento Postale.
^(0[1-9]|[1-4]\d|5[0-2])\d{3}$
5-digit Spanish postal code (CP).
^\d{2}-\d{3}$
Polish postal in NN-NNN format.
^\d{4}\s?[A-Z]{2}$
NNNN AA format Dutch postal.
^\d{3}[\-\s]?\d{3}[\-\s]?\d{3}$
9-digit Social Insurance Number, often formatted with spaces.
^[A-CEGHJ-NPRSTVXY]\d[A-CEGHJ-NPRSTV-Z]\s?\d[A-CEG…
Canadian postal code in A1A 1A1 format.
^\d{3}\s?\d{3}\s?\d{2,3}$
8 or 9-digit Tax File Number.
^\d{2}\s?\d{3}\s?\d{3}\s?\d{3}$
11-digit Australian Business Number.
^\d{4}$
4-digit Australian postcode.
^\d{3}\.\d{3}\.\d{3}-\d{2}$
Cadastro de Pessoas Físicas — Brazil individual taxpayer ID.
^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$
Brazilian company tax ID — 14 digits.
^\d{5}-?\d{3}$
Brazilian postal code — 8 digits.
^1[3-9]\d{9}$
11-digit Chinese mobile, starts with 1[3-9].
^\d{3}-\d{4}$
7-digit Japanese postal code, formatted NNN-NNNN.
^\d{17}[\dXx]$
18-character Chinese national ID.
^\d{12}$
12-digit Japanese personal number (Kojin Bangō).
^\d{6}-[1-8]\d{6}$
13-digit Resident Registration Number, formatted with hyphen.
^[STFGM]\d{7}[A-Z]$
Letter + 7 digits + check letter (FIN/NRIC).
^[A-Z]{1,2}\d{6}\([\dA]\)$
Hong Kong identity card — 1-2 letters + 6 digits + check.
^\d{13}$
13-digit Thai citizen ID.
^[A-Z][12]\d{8}$
1 letter + 9 digits, Taiwanese national ID.
^\d{6}-\d{2}-\d{4}$
12-digit Malaysian national ID, formatted YYMMDD-PB-NNNG.
^\d{16}$
16-digit Indonesian national ID (Nomor Induk Kependudukan).
^\d{12}$
12-digit Vietnamese citizen ID (CCCD).
^(\+81[\s\-]?|0)\d{1,4}[\s\-]?\d{1,4}[\s\-]?\d{3…
Japanese landline or mobile (+81).
^\+52[\s\-]?1?[\s\-]?\d{2,3}[\s\-]?\d{3,4}[\s\-]…
Mexican phone with +52 country code.
^\+55[\s\-]?\(?\d{2}\)?[\s\-]?9?\d{4}[\s\-]?\d{4}$
Brazilian phone in +55 (XX) NNNNN-NNNN format.
^(\+61|0)[\s\-]?[2-478][\s\-]?\d{4}[\s\-]?\d{4}$
Australian phone with +61 prefix.
^\+971[\s\-]?\d{1,2}[\s\-]?\d{3}[\s\-]?\d{4}$
UAE phone with +971 country code.
^(\+27|0)[\s\-]?\d{2}[\s\-]?\d{3}[\s\-]?\d{4}$
South African phone in +27 format.
^(\+7|8)[\s\-]?\(?\d{3}\)?[\s\-]?\d{3}[\s\-]?\d{…
Russian phone with +7 prefix.
^\d{6}$
6-digit Russian postal index.
^\d{5}$
5-digit Mexican postal code.
^[A-Z]\d{4}[A-Z]{3}$
Letter + 4 digits + 3 letters (CPA Argentino).
^\d{6}$
6-digit Chinese postal code.
Found a regex worth sharing, or a category we're missing? Tell us about it. Form opens your email client with a structured submission.