piighost/es-postal
Spanish postal code: five digits whose first two are a province from 01 to 52. Identical in length to the French, German, Italian and US codes, so two of them in one detector fight for the same span and the first declared wins.
Label: ES_POSTAL
Pattern (?<!\d)(?:0[1-9]|[1-4]\d|5[0-2])\d{3}(?!\d)
Must be caught Vive en Madrid, 28001 exactamente. → 28001Codigo postal 08013 en Barcelona. → 08013
Must be left alone Codigo postal 53001Codigo 2800
Tags: es, location, contact
Download the detector as TOML
Used by
piighost/es — Spain: phone, postal code, the DNI and NIE identity numbers and the CIF company tax number.
Related patterns
piighost/ar-phone — Argentine phone number, the +54 country code or the 0 trunk prefix then ten or eleven digits.
piighost/ar-postal — Argentine CPA postal code: a province letter, four digits for the town, then three letters for the block side.
piighost/at-phone — Austrian phone number, the +43 country code or the 0 trunk prefix then six to thirteen digits, since Austrian…
piighost/au-phone — Australian phone number: the +61 or leading 0 prefix, a single area or service digit, then eight digits.
piighost/au-postal — Australian postal code, anchored on the state or territory abbreviation that precedes it in an address.
piighost/be-phone — Belgian phone number, the +32 country code or the 0 trunk prefix then eight or nine digits.
← piighost/es-phone · All patterns in the catalogue · piighost/eth-address →