NI Number Validation
From TekiWiki
This whole wiki has now moved to http://www.springboardsolutions.com/wiki
Go to this page NI Number Validation
| Line 83: | Line 83: | ||
Using each of the exception patterns from the table above, the regular expression to validate employee payroll NI numbers is (new lines are to fit page only): | Using each of the exception patterns from the table above, the regular expression to validate employee payroll NI numbers is (new lines are to fit page only): | ||
<pre> | <pre> | ||
| - | ([ABEGHJ-LORSW-Z][ABCEGHJ-NPRSTW-Z])|(C[ABCEGHJ-NPSTW-Z])|(M[ABCEGHJ-NPRSTX-Z]) | + | ([ABEGHJ-LORSW-Z][ABCEGHJ-NPRSTW-Z])|(C[ABCEGHJ-NPSTW-Z]) |
| - | |(N[ABEGHJ-NPRSTW-Z])|(P[ABCEGHJ-NRSTWX])|(T[ABCEGHJ-MPRSTW-Z])[0-9]{6}[A-D] | + | |(M[ABCEGHJ-NPRSTX-Z])|(N[ABEGHJ-NPRSTW-Z])|(P[ABCEGHJ-NRSTWX]) |
| + | |(T[ABCEGHJ-MPRSTW-Z])[0-9]{6}[A-D] | ||
</pre> | </pre> | ||