Skip to content

Instantly share code, notes, and snippets.

@ronka
Last active July 29, 2021 07:36
Show Gist options
  • Save ronka/2f0013b66624693d3ca9c7deab0db9a3 to your computer and use it in GitHub Desktop.
Save ronka/2f0013b66624693d3ca9c7deab0db9a3 to your computer and use it in GitHub Desktop.
Israeli phone number validation
var regex = /^0(5[^7]|[2-4]|[8-9]|7[0-9])[0-9]{7}$/;
regex.test('123456789'); // false
regex.test('0778330035'); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment