Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
Created·2021-03-20 22:05
Flavor·PCRE2 (PHP)

/
^(?!BG|GB|KN|NK|NT|TN|ZZ)[^DFIQUV][^DFIQUVo][0-9]{6}[ABCD]$
/
img
Open regex in editor

Description

This regular expression is build from the description of NINO number of GOV.UK,

Submitted by Iftakhar Husan