piighost/au-passport

Australian passport number, eight or nine characters, per the Purview Australia passport definition: one letter from N, E, D, F, A, C, U or X followed by seven digits, or one of the pairs PA, PB, PC, PD, PE, PF, PU, PW, PX or PZ followed by seven digits. The restricted prefixes cut a lot of noise. Reproduced collision: the nine character P form, for instance PA7654321, is matched whole by US_DEA, whose first letter set includes P and whose second position accepts any letter, so Australian passports and United States controlled substance registrations land on the same string.

Label: AU_PASSPORT

Pattern

(?<!\w)(?:[ACDEFNUX]\d{7}|P[A-FUWXZ]\d{7})(?!\w)

Must be caught

Must be left alone

Tags: au, government-id, identity

Download the detector as TOML