各种电话正则

400电话的正则/^400[0-9]{7}/

800电话正则/^800[0-9]{7}/

手机号码正则^1[34578]\d{9}$

座机号码正则^0[0-9]{2,3}-[0-9]{8}

要匹配其中之一就在中间以|隔开

(400正则)|(800正则)|(手机号)|(座机号)|

/^400[0-9]{7}|^1[34578]\d{9}$|^0[0-9]{2,3}-[0-9]{8}/

手机号码:^1[345678]\d{9}$

电话号码:("XXX-XXXXXXX"、"XXXX-XXXXXXXX"、"XXX-XXXXXXX"、"XXX-XXXXXXXX"、"XXXXXXX"和"XXXXXXXX):^((\d{3,4}-)|\d{3.4}-)?\d{7,8}$

国内电话号码(0511-4405222、021-87888822):\d{3}-\d{8}|\d{4}-\d{7}

电话号码正则表达式(支持手机号码,3-4位区号,7-8位直播号码,1-4位分机号):
((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)

你可能感兴趣的:(各种电话正则)