当前位置:网站首页>2020, the regular expression for mobile phone verification of the latest mobile phone number is continuously updated
2020, the regular expression for mobile phone verification of the latest mobile phone number is continuously updated
2022-07-01 18:49:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
Recently, I was writing an online project with someone else , Today, there is a bug, Partially normal mobile phone No. verification format is incorrect , After checking the code, I found that there was a big error in the regular expression , Pictured :
The problem is : 1. There is a comma
2. Not comprehensive enough , Some normal mobile phone numbers fail to pass the verification
So I decided to write it myself , Baidu mobile phone number format , The following should be more comprehensive , So write the regular expression for verification according to the following , If any partner finds that there are still omissions in the figure below, please point out in the comments , I will update it as soon as I see it
Finally, write the regular expression :( Netizens have suggested that the following regular expressions are missing ,130,181,180) Cannot pass
Pattern p = Pattern.compile("^1(3([1-35-9]\\d|4[1-8])|4[14-9]\\d|5([0-25689]\\d|7[1-79])|66\\d|7[2-35-8]\\d|8[2-9]\\d|9[89]\\d)\\d{7}$");
Matcher m = p.matcher(mobile);
2020-07-15 Update the modified code :
Pattern p = Pattern.compile("^1(3([0-35-9]\\d|4[1-8])|4[14-9]\\d|5([0125689]\\d|7[1-79])|66\\d|7[2-35-8]\\d|8\\d{2}|9[89]\\d)\\d{7}$");
Matcher m = p.matcher(mobile);
2020-09-24 to update , newly added 191,193,195 cell-phone number
Netizens suggest that there is 191,195 cell-phone number , Combined with the following news
Pattern p = Pattern.compile("^1(3([0-35-9]\\d|4[1-8])|4[14-9]\\d|5([0125689]\\d|7[1-79])|66\\d|7[2-35-8]\\d|8\\d{2}|9[13589]\\d)\\d{7}$");
Matcher m = p.matcher(mobile);
2020-11-07 to update , Missing after reminder 153 The cell phone number of
Pattern p = Pattern.compile("^1(3([0-35-9]\\d|4[1-8])|4[14-9]\\d|5([0-35689]\\d|7[1-79])|66\\d|7[2-35-8]\\d|8\\d{2}|9[13589]\\d)\\d{7}$");
Matcher m = p.matcher(mobile);
2021-01-12 to update , Missing after reminder 1349 The cell phone number of
Pattern p = Pattern.compile("^1(3\\d{2}|4[14-9]\\d|5([0-35689]\\d|7[1-79])|66\\d|7[2-35-8]\\d|8\\d{2}|9[13589]\\d)\\d{7}$");
Matcher m = p.matcher(mobile);
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/130799.html Link to the original text :https://javaforall.cn
边栏推荐
- Leetcode-83 删除排序链表中重复的元素
- What designs are needed in the architecture to build a general monitoring and alarm platform
- Leetcode-141环形链表
- 如何运营好技术相关的自媒体?
- Facebook聊单,SaleSmartly有妙招!
- 11、用户、组和权限(1)
- R language epidisplay package ordinal or. The display function obtains the summary statistical information of the ordered logistic regression model (the odds ratio and its confidence interval correspo
- D. Yet Another Minimization Problem
- 力扣每日一题-第32天-1232. 缀点成线
- Depth first search - DFS (burst search)
猜你喜欢
Weekly recommended short videos: be alert to the confusion between "phenomena" and "problems"
Leetcode-160 intersecting linked list
[image denoising] matlab code for removing salt and pepper noise based on fast and effective multistage selective convolution filter
Three. JS learning - basic operation of camera (learn from)
About enterprise middle office planning and it architecture microservice transformation
Lumiprobe 生物分子定量丨QuDye 蛋白定量试剂盒
NSI packaging script add file details
必看,时间序列分析
Navicat premium 15 permanent cracking and 2021 latest idea cracking (valid for personal testing)
Depth first search - DFS (burst search)
随机推荐
How to manage 1000 anchors by one person?
Find all missing numbers in the array
Technology implementation and Architecture Practice
Memo - about C # generating barcode
R language uses the transmute function of dplyr package to calculate the moving window mean value of the specified data column in dataframe data, and uses ggplot2 package to visualize the line graph b
lefse分析
Leetcode-160 intersecting linked list
Must see, time series analysis
R language ggplot2 visualization: gganimate creates a dynamic histogram animation (GIF), and displays the histogram and enter step by step along a given dimension in the animation_ Growth function and
What if the reliability coefficient is low? How to calculate the reliability coefficient?
app发版后的缓存问题
数据库基础:select基本查询语句
Li Kou daily question - Day 32 -1232 Dotted line
How does factor analysis calculate weights?
R language uses follow up of epidisplay package Plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses n.of The lines parameter specifies the num
Regular expression
R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用pch参数自定义指定点图数据点的形状
R语言使用epiDisplay包的tableStack函数制作统计汇总表格(基于目标变量分组的描述性统计、假设检验等)、不设置by参数则计算数据框指定数据列范围的基础描述性统计信息
研究了11种实时聊天软件,我发现都具备这些功能…
2、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》启动并运行您的本地环境