Cheatsheet — every pattern
Each page below is a battle-tested regex: a real score on a corpus, a comparison against competing patterns with their sources, and honestly documented limits.
All postal codes by countryAll licence plates by countryAll phone numbers by countryRexact for AI assistants (MCP)
France / EU specific
- Belgian licence plate
- Belgian national register number
- Czech postal code (PSČ)
- Danish CPR number
- Dutch licence plate (kenteken)
- Dutch postal code
- Finnish personal identity code (henkilötunnus)
- French APE/NAF business activity code
- French date (dd/mm/yyyy)
- French intra-EU VAT number
- French phone number
- French postal code
- French social security number (NIR)
- German licence plate
- German postal code (PLZ)
- IBAN
- Irish Eircode
- Italian licence plate
- Polish licence plate
- Polish PESEL
- Polish postal code
- Portuguese licence plate
- Portuguese postal code
- SIREN number
- SIV license plate
- Spanish licence plate (current format)
- Spanish phone number
- Spanish postal code
- Swedish personnummer
- Swedish postal code
Universal
- 24-hour time (HH:MM:SS)
- ABA routing number
- American Express card number
- Apache log line (Common Log Format)
- Argentine CUIT (tax identifier)
- Argentine postal code (CPA)
- arXiv identifier
- ATC code (medicine)
- Australian ABN (business number)
- Australian phone number
- Australian postcode
- Austrian licence plate
- AWS access key ID (AKIA…)
- Base64 string
- bcrypt hash
- Belgian phone number
- Belgian VAT number (BE + 10 digits)
- BIC / SWIFT code
- Bitcoin address
- Brazilian CNPJ (alphanumeric)
- Brazilian CPF
- Brazilian licence plate
- Brazilian phone number
- Brazilian postal code (CEP)
- Bulgarian EGN (unified civil number)
- Canadian phone number
- Canadian postal code
- Canadian SIN
- CAS Registry Number
- Chilean RUT
- Chinese 18-character identity number
- Chinese phone number
- Conventional Commits message
- Croatian OIB (personal identification number)
- cron expression
- currency amount
- CUSIP (North American security)
- Czech licence plate
- Czech rodné číslo (birth number)
- Decimal GPS coordinates
- Diners Club card number
- Discover card number
- Docker image reference (name:tag@digest)
- DOI (Digital Object Identifier)
- domain name (hostname)
- Dutch BSN (burgerservicenummer)
- Dutch phone number
- Dutch VAT number (btw-nummer)
- EAN-13
- EAN-8 (GTIN-8)
- Estonian personal code (isikukood)
- Ethereum address
- German phone number
- German Steuer-IdNr (tax identification number)
- German VAT number (USt-IdNr.)
- GitHub @username mention
- GitHub access token (ghp_, github_pat_…)
- GLN (Global Location Number)
- GTIN-14 (ITF-14)
- hex color code
- Hong Kong identity card number (HKID)
- HTML tag
- IATA airport code
- ICD-10-CM code (diagnosis)
- IMEI number
- Indian Aadhaar number
- Indian GSTIN (tax number)
- Indian PAN (Permanent Account Number)
- Indian PIN code
- IPv4 address
- IPv4 address in CIDR notation
- IPv6 address
- Irish PPS number (Personal Public Service)
- ISBN (ISBN-10 or ISBN-13)
- ISIN code
- ISO 4217 currency code
- ISO 8601 duration (P1DT12H)
- ISO 8601 timestamp
- ISRC
- ISSN
- ISWC (musical work code)
- Italian Codice Fiscale
- Italian phone number
- Italian VAT number (partita IVA)
- Japanese phone number
- Japanese postal code
- JCB card number
- JWT (JSON Web Token)
- LEI (Legal Entity Identifier)
- Lithuanian personal code (asmens kodas)
- MAC address
- Mastercard card number
- Mastodon username
- Mexican CURP
- Mexican phone number
- Minecraft (Java Edition) username
- MMSI identifier
- network port number
- Norwegian national identity number (fødselsnummer)
- Norwegian phone number
- npm access token (npm_…)
- npm package name
- ORCID identifier
- Polish phone number
- Portuguese NIF (número de identificação fiscal)
- Romanian CNP (cod numeric personal)
- SEDOL (UK security code)
- SemVer version number
- Sentry DSN (Data Source Name)
- SHA-256 digest (hexadecimal)
- shipping container number (ISO 6346)
- Singapore NRIC / FIN
- Slack token (xoxb-, xoxp-, xapp-…)
- South African ID number
- South African phone number
- Spanish DNI/NIE
- Spanish VAT number (NIF, CIF, NIE)
- SteamID64 (Steam)
- Stripe API key (sk_live_, pk_test_…)
- strong password
- Swedish licence plate
- Swedish phone number
- Swiss phone number
- Swiss postal code (PLZ/NPA)
- Twitch username
- UK NINO
- UK phone number
- UK postcode
- UK vehicle registration (current format)
- UnionPay card number
- URL slug
- US date (MM/DD/YYYY)
- US phone number
- US SSN
- US ZIP code (ZIP and ZIP+4)
- UUID
- VIN (vehicle identification number)
- Visa card number
- web URL
- Xbox Gamertag