Last active
December 13, 2015 18:58
-
-
Save damour/4959422 to your computer and use it in GitHub Desktop.
Регулярное выражение правильность украинских номеров (моб и городской 7-значный) PHP, javascript thanks http://habrahabr.ru/users/Kindman/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preg_match("/(?<!\w)(?:(?:(?:(?:\+?3)?8\W{0,5})?0\W{0,5})?[34569]\s?\d[^\w,;(\+]{0,5})?\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d(?!(\W?\d))/x", $_POST['tel'], $output_array) | |
if (/(\w)(?:(?:(?:(?:\+?3)?8\W{0,5})?0\W{0,5})?[34569]\s?\d[^\w,;(\+]{0,5})?\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d(?!(\W?\d))/.test($('#phone').val()) == false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment