Spanish Phone Number
Detects Spanish national telephone numbers per Spain's closed 9-digit numbering plan (Plan Nacional de Numeración Telefónica, administered under CNMC oversight): mobile numbers (segment N=6 in full, plus N=7 partially opened for mobile use in the 71/72/73/74 sub-ranges by the SETSI Resolución de 12 de marzo de 2010, BOE-A-2010-5251; the first 7-prefixed mobile numbers entered service from late 2010/2011 once the then-regulator CMT assigned the new ranges to operators) and geographic numbers (leading 8 or 9, with the second digit constrained to never be 0 — a constraint that incidentally excludes the 900/901/902/905 toll-free and premium-rate service ranges, whose second digit is 0). Spain has no domestic trunk prefix, so the +34 international form carries the same 9 significant digits as the domestic form, just with the +34 prefix in place of nothing.
- Type
- regex
- Engine
- universal
- Confidence
- medium
- Confidence justification
- Medium confidence: the mobile (6, or 7 with second digit 1-4) and geographic (8/9 with non-zero second digit) leading-digit constraints narrow the format, but Spanish numbers carry no checksum and a 9-digit sequence with those leading digits is still a high digit-collision format. Per the phone-family convention (every tier requires positive corroborative evidence; a +CC prefix alone is insufficient gating; there is no 65 rung), both the domestic and +34 international sub-regexes are evidence-gated at every tier: 75 requires generic phone-context evidence and 85 requires country-specific phone keywords with template/noise exclusion. The literal +34 prefix improves precision when present but is not by itself sufficient gating.
- Jurisdictions
- es
- Regulations
- GDPR
- Frameworks
- ISO 27001, ISO 27701, SOC 2
- Data categories
- pii, contact-information
- Scope
- narrow
- Risk rating
- 5
- Platform compatibility
- Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported
Pattern
(?<!\d)(?:\+34[\s.-]?(?:6[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d|7[1-4][\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d|[89][1-9][\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d)|6[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d|7[1-4][\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d|[89][1-9][\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d[\s.-]?\d)(?!\d)
Corroborative evidence keywords
phone, mobile, call, text, contact number, Spanish phone number, número de teléfono, call me at, cell, telephone, tel, dial, text me, text message, [object Object], WhatsApp, voicemail, phone number, mobile number, landline (+8 more)
Proximity: 300 characters
Should match
Móvil: 612 345 678— Domestic mobile, N=6 segment, illustrative synthetic value (no official CNMC-reserved fictional range exists — verified absent during research)Contacto: 711 234 567— Domestic mobile, N=7 segment (71-74 sub-range opened by the March 2010 SETSI resolution, in service since 2010/2011), illustrative synthetic valueFijo: 912 345 678— Domestic geographic, leading 9 with non-zero second digit, illustrative synthetic valueInternational: +34 612 345 678— International +34 form of the mobile number, same 9 significant digits (no trunk 0 to drop)
Should not match
512 345 678— Leading digit 5 is not a valid mobile (6, 7) or geographic (8, 9) leading digit900 123 456— Leading 9 but second digit is 0 — a toll-free/premium-rate service number, excluded by the non-zero-second-digit geographic constraint61234567— Only 8 digits — one short of the required 98612345678999— Valid-shaped digit run embedded inside a longer reference number, rejected by digit boundaries
Known false positives
- A 9-digit sequence with a valid mobile or geographic leading-digit shape can still coincidentally match invoice numbers, order numbers, or other structured identifiers of the same length and leading-digit distribution. Mitigation: Every tier — for both the domestic and +34 international sub-regexes — requires positive phone-context or country-specific evidence within 300 characters; no zero-evidence tier exists, so a bare digit run without corroborating context never fires at any confidence level.
- No official CNMC-reserved fictional or test number range exists for Spain (confirmed by web research, unlike NANP's 555-01XX or Ofcom's drama numbers), so illustrative synthetic values were used instead of an authoritative reserved range. Mitigation: Test values use clearly non-representative sequential digit patterns; deployers should substitute their own tenant's synthetic test data for live validation rather than relying on a non-existent official reserved range.
- The domestic sub-regex also fires inside the +34 international rendering when the number is written with separators (empirically verified: in "+34 612 345 678" it matches the "612 345 678" substring — Spain has no trunk prefix, so the digits after "+34 " are exactly the domestic form; the contiguous "+34612345678" rendering is protected by the digit-boundary lookbehind). Mitigation: Benign co-fire, left in place deliberately: both sub-regexes carry identical evidence gating and confidence levels, so the duplicate match cannot inflate confidence — it can only duplicate a finding at the same level, which reporting layers de-duplicate by offset. A structural fix would need variable-width negative lookbehind, which the universal engine target does not support.
References
- CNMC: Registro de Numeración de Telecomunicaciones (9-digit closed numbering plan)
- BOE-A-2010-5251: Resolución de 12 de marzo de 2010, de la SETSI — attribution of the 71/72/73/74 sub-ranges to mobile services (primary source)
- CNMC: Informe Económico Sectorial 2012 — Numeración (reporting the March 2010 SETSI resolution and the subsequent CMT range assignments)
- Consumo Responde (Spanish government consumer service): Tipología de los números de teléfono existentes en España