Skip to content

Instantly share code, notes, and snippets.

@Androguide
Last active March 15, 2021 20:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Androguide/c5d4938e21d6716984f6 to your computer and use it in GitHub Desktop.
Save Androguide/c5d4938e21d6716984f6 to your computer and use it in GitHub Desktop.
French phone number regex
var regex = new RegExp(/^[+](\d{3})\)?(\d{3})(\d{5,6})$|^(\d{10,10})$/);
regex.test('0612345678') // true
regex.test('06123456789') // false
regex.test('+33612345678') // true
regex.test('+330612345678') // true
regex.test('+3306123456789') // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment