Skip to content

Instantly share code, notes, and snippets.

@ndrew
Created August 11, 2015 01:45
Show Gist options
  • Save ndrew/e385e6a8ba31f44580c8 to your computer and use it in GitHub Desktop.
Save ndrew/e385e6a8ba31f44580c8 to your computer and use it in GitHub Desktop.
Great Britain Zip Code Regex
GIR[ ]?0AA|((AB|AL|B|BA|BB|BD|BH|BL|BN|BR|BS|BT|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}))|BFPO[ ]?\d{1,4}
via http://stackoverflow.com/questions/578406/what-is-the-ultimate-postal-code-and-zip-regex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment