undoing some of the optimisations

This commit is contained in:
Martin Donnelly 2016-03-17 12:09:08 +00:00
parent aaac571c81
commit 1e7e87a62d

View File

@ -109,20 +109,16 @@ VALIDATE = new function() {
var pcexp = [];
// BFPO postcodes
pcexp.push(new RegExp('^(bf1)(\\s*)([0-6]{1}' + BFPOa5 + '{1}' + BFPOa6
+ '{1})$', 'i'));
pcexp.push(new RegExp('^(bf1)(\\s*)([0-6]{1}' + BFPOa5 + '{1}' + BFPOa6 + '{1})$', 'i'));
// Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2
+ '?[0-9]{1,2})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2 + '?[0-9]{1,2})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
// Expression for postcodes: ANA NAA
pcexp.push(new RegExp('^(' + alpha1 + '{1}[0-9]{1}' + alpha3
+ '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
pcexp.push(new RegExp('^(' + alpha1 + '{1}[0-9]{1}' + alpha3 + '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
// Expression for postcodes: AANA NAA
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2 + '{1}' + '?[0-9]{1}'
+ alpha4 + '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2 + '{1}' + '?[0-9]{1}' + alpha4 + '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
// Exception for the special postcode GIR 0AA
pcexp.push(/^(GIR)(\s*)(0AA)$/i);