Spain Tax Identification Number
Detects Spain Tax Identification Number patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Due to the numeric format, corroborative evidence keywords are essential for reliable detection.
- Type
- regex
- Engine
- universal
- Confidence
- high
- Confidence justification
- High confidence: eight digits followed by a single letter is a distinctive format for Spanish NIF/DNI numbers.
- Detection quality
- Verified
- Jurisdictions
- es, eu
- Regulations
- GDPR
- Data categories
- pii, financial, government-id
- Scope
- narrow
- Risk rating
- 7
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Compatible
Pattern
\b\d{8}[A-Z]\b
Corroborative evidence keywords
NIF, número de identificación fiscal, DNI, CIF, Hacienda, tax identification, TIN, tax identification number, tax number, tax return, IRD, tax ID, inland revenue, taxpayer identification, αριθμός φορολογικού μητρώου, ΑΦΜ, φορολογικός, Abgabenkontonummer, adóazonosító, adószám (+20 more)
Proximity: 300 characters
Should match
12345678A— Spanish NIF with letter suffix98765432Z— Spanish tax identification number11223344M— Spanish DNI/NIF format
Should not match
1234567A— Only 7 digits, too short for Spanish NIF123456789A— 9 digits with letter, exceeds Spanish NIF format
Known false positives
- Generic numeric sequences in non-tax contexts such as reference numbers or account identifiers Mitigation: Require corroborative evidence keywords within the proximity window to distinguish tax identifiers from general numeric data.
- Numbers from other identification schemes with similar digit patterns Mitigation: Layer with jurisdiction-specific detection to prioritise matches in tax-related documents and cross-reference with other identifier types.