The great God asks for the complete cell phone number regular expression
Reply content:
The great God asks for the complete cell phone number regular expression
^13[0-9]{9}|15012356789{8}|180256789{8}|147[0-9]{8}$
/^ ((13|8) |14[5|7]|15[0-3|5-9]|17[3|6-8]) d{8}$/
/^(13[0-9]|15[012356789]|17[0678]|18[0-9]|14[57])[0-9]{8}$/
Php:
function checkphone($phone){ if(preg_match("/1[3458]{1}\d{9}$/",$phone)){ return true; }else{ return false; }}
/^ (+?0?86-?)? 1[345789]d{9}$/
var checkphonenumber = function (MOBILE) {
var reg= /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;return reg.test(mobile);
}
It seems to repeat with @zealyw ...
var reg = /^(13[0-9]|15[0-35-9]|18[0-9]|17[06-8]|14[57])\d{8}$/
Https://gist.github.com/yuezk ...
Now the phone number is not necessarily the beginning of the 1.
$reg = "/^1 (3[0-9]|4[57]|5[0-35-9]|8[0-9]|70) \d{8}$/";
$regForYD="/(^1(3[4-9]|4[7]|5[0-27-9]|7[8]|8[2-478])\\d{8}$)|(^1705\\d{7}$)/"; //移动 $regForLT="/(^1(3[0-2]|4[5]|5[56]|7[6]|8[56])\\d{8}$)|(^1709\\d{7}$)/"; //联通 $regForDX="/(^1(33|53|77|8[019])\\d{8}$)|(^1700\\d{7}$)/"; //电信 if (preg_match($reg, $phone)||preg_match($regForYD, $phone)||preg_match($regForLT, $phone)||preg_match($regForDX, $phone)) return true; return false;
/^((\(\d{3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}$/