piighost/uk-driving-licence

DVLA driver number, sixteen characters that encode the holder: five characters of surname padded with nines, the decade digit of the birth year, the birth month raised by fifty for a female holder, the birth day, the last year digit, two initials or nines, one arbitrary character and two check letters. Taken from the Presidio UK driving licence recognizer, which follows the DVLA layout; Purview describes the same run plus the two digit issue number that the card prints after it, and those eighteen character forms are deliberately not matched here. The embedded month and day ranges make this one of the most selective shapes in the batch. No registry label was seen to fire on the examples.

Label: UK_DRIVING_LICENCE

Pattern

(?<!\w)[A-Z9]{5}\d(?:0[1-9]|1[0-2]|5[1-9]|6[0-2])(?:0[1-9]|[12]\d|3[01])\d[A-Z9]{2}[A-Z0-9][A-Z]{2}(?!\w)

Must be caught

Must be left alone

Tags: uk, government-id, identity

Download the detector as TOML