Skip to content

Instantly share code, notes, and snippets.

@sandeepsh3090
Created February 16, 2017 13:04
Show Gist options
  • Save sandeepsh3090/ed4e67fc6059b0682fd6a53d63b06896 to your computer and use it in GitHub Desktop.
Save sandeepsh3090/ed4e67fc6059b0682fd6a53d63b06896 to your computer and use it in GitHub Desktop.
PHONE_REGEX @"([+1]{2})([1-9]{1})[0-9]{9}?|([1-9]{1})[0-9]{9}|^$"
This regex check for following formates +1xxxxxxxxxx (+11234567890)
xxxxxxxxxx (1234567890)
if phone is optional(nil phone number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment