Skip to content

Instantly share code, notes, and snippets.

@culshaw
Last active December 18, 2015 23:59
Show Gist options
  • Save culshaw/5865754 to your computer and use it in GitHub Desktop.
Save culshaw/5865754 to your computer and use it in GitHub Desktop.
This is a file with some useful regexes.
# Phone number regex.
`^([\+\(\)\-\d\s]+)$`
Matches all phone numbers including the following characters ()+- and spaces. e.g. `+ 44 (0) 75-111-57-220`
# Swedish postcodes.
`^(\d\s?){5}$`
# Dutch postcode
`^(\d\s?){4}([A-Z]\s?){2}$`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment