当前位置:网站首页>正则匹配手机号
正则匹配手机号
2022-06-24 08:08:00 【BigChen_up】
/** * 正则:手机号(精确) * 移动:134、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188、198 *联通:130、131、132、145、155、156、175、176、185、186、166 * 电信:133、 173、177、180、181、189、199 * 虚拟运营商:170 */
// $pattern = '!^1(34|35|36|37|38|39|47|50|...)\d{8}$!';
$pattern = '/^1([38]\d|4[57]|5[0-25-9]|66|7[035-8]|9[89])\d{8}$/';
$res = preg_match($pattern, $subject);
echo $res ? '是' : '非';
echo '手机号<hr>';
边栏推荐
- Niuke network decimal integer to hexadecimal string
- 2022.6.13-6.19 AI行业周刊(第102期):职业发展
- Squid代理服务器应用
- 2022-06-23: given a nonnegative array, select any number to make the maximum cumulative sum a multiple of 7, and return the maximum cumulative sum. N is larger, to the 5th power of 10. From meituan. 3
- Numpy NP in numpy c_ And np r_ Explain in detail
- 当程序员被问会不会修电脑时… | 每日趣闻
- [use picgo+ Tencent cloud object to store cos as a map bed]
- Inspiration from reading CVPR 2022 target detection paper
- Data middle office: middle office practice and summary
- Threejs glow channel 01 (unrealbroompass & layers)
猜你喜欢

【ES6闯关】Promise堪比原生的自定义封装(万字)

学习太极创客 — ESP8226 (十三)OTA

Ordinary people have no education background. Can they earn more than 10000 yuan a month by Self-taught programming?

EasyExcel单sheet页与多sheet页写出

零基础自学SQL课程 | 相关子查询

Redis implements a globally unique ID

学习太极创客 — ESP8226 (十二)ESP8266 多任务处理

Lu Qi: I am most optimistic about these four major technology trends

Xiaobai needs to learn MySQL - incremental statistical SQL

Time Series Data Augmentation for Deep Learning: A Survey 之论文阅读
随机推荐
【Redis實現秒殺業務①】秒殺流程概述|基本業務實現
每周推薦短視頻:談論“元宇宙”要有嚴肅認真的態度
金仓KFS replicator安装(Oracle-KES)
4275. Dijkstra sequence
The printed object is [object object]. Solution
牛客网 字符串变形
嵌入式 | 硬件转软件的几条建议
Alibaba Senior Software Testing Engineer recommends testers to learn -- Introduction to security testing
[noi Simulation Competition] send (tree DP)
Squid proxy application
【LeetCode】415. String addition
P6117-[JOI 2019 Final]コイン集め【贪心】
The list of open source summer winners has been publicized, and the field of basic software has become a hot application this year
【Redis实现秒杀业务①】秒杀流程概述|基本业务实现
零基础自学SQL课程 | 子查询
Target detection series fast r-cnn
Applet wx show
Some common pitfalls in getting started with jupyter:
Numpy NP in numpy c_ And np r_ Explain in detail
Linux MySQL installation