piighost/uk-nino

UK National Insurance number: two letters from the allowed set, six digits, then a letter from A to D. The prefix classes exclude D, F, I, Q, U and V, which HMRC never issues, so the shape alone is already selective. One consequence worth knowing: HMRC's own example number QQ123456C is not matched, because Q is one of the excluded letters, which is exactly why HMRC publishes it.

Label: UK_NINO

Pattern

\b[A-CEGHJ-PR-TW-Z]{2}\d{6}[A-D]\b

Must be caught

Must be left alone

Tags: uk, government-id, identity, hr

Download the detector as TOML