iOS: Valid zip code check
Question: How would one write a function to check and return whether or not a string (NSString) contains a valid zip code worldwide. Additional info: I am aware of RegEx in iOS. However I am not so fluent at it. Please keep in mind this should accepts anything valid in any country as true. Examples US - "10200" US - "33701-4313" Canada - "K8N 5W6" UK - "3252-322" etc. Edit: Those who voted down or to close the question, please do mention why. Thank you. ^[ABCEGHJKLMNPRSTVXY]\d[A-Z][- ]*\d[A-Z]\d$ Matches Canadian PostalCode formats with or without spaces (e.g., "T2X 1V4" or "T2X1V4") ^\d{5}(-