piighost/it-codice-fiscale

Italian codice fiscale: six name letters, two year characters, a month letter taken from the twelve letter set, two day characters with forty added for a woman, a Belfiore place code of one letter and three characters, then a check letter. The digit positions accept the omocodia substitutes, the letters the tax office writes in place of digits to break a tie, so those variants still match. That tolerance is the main noise source, it widens five positions, and a sixteen character uppercase token carrying a month letter in the ninth position can false-positive. No collision with any existing pattern.

Label: IT_CODICE_FISCALE

Pattern

\b[A-Z]{6}[0-9LMNP-V]{2}[A-EHLMPRST][0-9LMNP-V]{2}[A-Z][0-9LMNP-V]{3}[A-Z]\b

Must be caught

Must be left alone

Tags: it, government-id, identity

Download the detector as TOML