Regular Expressions 101

Community Patterns

Community Library Entry

3

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

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

Submitted by Iftakhar Husan - 4 years ago