Skip to content

Instantly share code, notes, and snippets.

@spc16670
Last active February 21, 2024 11:36
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save spc16670/305f750a6ecdce767d874c21fcf9b291 to your computer and use it in GitHub Desktop.
UK Postcode Regex pattern
(GIR 0AA)
| (((XX[0-9][0-9]?)
| ([A-Z-[QVX]][0-9][0-9]?)
| (([A-Z-[QVX]][A-Z-[IJZ]][0-9][0-9]?)
| (([A-Z-[QVX]][0-9][A-HJKSTUW])
| ([A-Z-[QVX]][A-Z-[IJZ]][0-9][ABEHMNPRVWXY])))) [0-9][A-Z-[CIKMOV]]{2})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment