piighost/mx-curp

Mexican CURP: four letters from the name, the birth date, H or M for the sex, five letters for the state and the consonants, then two characters of control. Eighteen characters of mixed letters and digits in a fixed order, which is about as unmistakable as a national identifier gets.

Label: MX_CURP

Pattern

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

Must be caught

Must be left alone

Tags: mx, government-id, identity

Download the detector as TOML