


Regular expression to verify domestic mobile phone number and landline number
Mar 13, 2018 am 09:18 AM这次给大家带来验证国内手机号与座机号的正则表达式,验证国内手机号与座机号的正则表达式的注意事项有哪些,下面就是实战案例,一起来看一下。
验证手机号:^((13[0-9])|(14[7])|(15[^4,\\D])|(18[0,0-9])|(17[0,0-9]))\\d{8}$ 验证座机和手机号:@"^(0(10|2[0-5789]|3\\d{2}|4\\d{2}|5\\d{2}|6\\d{2}|7\\d{2}|8\\d{2}|9\\d{2})\\d{7,8}$)|(0(10|2[0-5789]|3\\d{2}|4\\d{2}|5\\d{2}|6\\d{2}|7\\d{2}|8\\d{2}|9\\d{2})-\\d{7,8}$)|(\\d{7,8}$)|(((13[0-9])|(14[7])|(15[^4,\\D])|(18[0,0-9])|(17[0,0-9]))\\d{8}$) (目前座机不支持分机号)
相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
推荐阅读:
The above is the detailed content of Regular expression to verify domestic mobile phone number and landline number. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to use Xiaohongshu account to find users? Can I find my mobile phone number?

How to set up if WeChat does not allow adding by mobile phone number

What does the +86 in front of a mobile phone number mean?

How to change the mobile phone number of Xiaohongshu account? Will there be any impact if I change my mobile phone number?

How to register two B-site numbers with one mobile phone number? How does Station B unbind its mobile phone?

What should I do if my railway 12306 mobile phone number has been changed and cannot be verified?

Enter your mobile phone number to check the full list of express delivery entrance URLs with one click

How to change the bound mobile phone number of Meituan when I no longer use it but cannot receive the verification code? How to change the bound mobile phone number?
