Comments (13)
好用就行, 你先用着, 我稍后再优化优化, 然后收录到网站
'91110108101966816T'.match(/^\d+(\d{9})/)
from any-rule.
就是看mdn文档, 多写多练, 我也是因为维护这个才用的熟练, 你平时主要工作用正则地方少, 练得少
get了,感谢,平时工作确实不怎么用,找个时间看看。
from any-rule.
from any-rule.
没毛病,好强大的正则,之前一直以为只是校验类的可以。get了
from any-rule.
好用就行, 你先用着, 我稍后再优化优化, 然后收录到网站
'91110108101966816T'.match(/^\d+(\d{9})/)
感谢
from any-rule.
@hpg-github 不客气
from any-rule.
@hpg-github 最后一位一定是大写字母吗?
from any-rule.
('91110108101966816T').match(/^(?:\d|[A-Z])+((?:\d|[A-Z]){9})(?:\d|[A-Z])$/i)
我有看了看"社会信用代码"的介绍, 你用这个,之前那个不行
from any-rule.
@hpg-github 最后一位一定是大写字母吗?
我刚刚查了查 ,不一定是大写的英文字母
91210200MA0QE7GT5L 91210200MA0QE7PH40 91210200710931264L
912102316738119081 91210231693282716J 91210200317986672Y
91210200MA0QCLUJXK 难搞啊
from any-rule.
@hpg-github 用这个
('91110108101966816T').match(/^(?:\d|[A-Z])+((?:\d|[A-Z]){9})(?:\d|[A-Z])$/i)[1]
from any-rule.
('91110108101966816T').match(/^(?:\d|[A-Z])+((?:\d|[A-Z]){9})(?:\d|[A-Z])$/i)我有看了看"社会信用代码"的介绍, 你用这个? 之前那个不行
你在那学的正则 我也想写,我再试试
from any-rule.
@hpg-github 用这个
('91110108101966816T').match(/^(?:\d|[A-Z])+((?:\d|[A-Z]){9})(?:\d|[A-Z])$/i)[1]
可以了 ,感谢
from any-rule.
就是看mdn文档, 多写多练, 我也是因为维护这个才用的熟练, 你平时主要工作用正则地方少, 练得少
from any-rule.
Related Issues (20)
- 我有更好的正则: 手机号(mobile phone)**(严谨), 根据工信部2019年最新公布的手机号段 HOT 1
- 我有更好的正则: 手机号(mobile phone)**(严谨), 根据工信部2019年最新公布的手机号段 HOT 1
- 我有更好的正则: 网址(URL)
- 我有更好的正则: **身份证
- 我有更好的正则: 火车车次
- 能不能搞个表情符号的啊,这个网上一大堆用了都不对
- 我有更好的正则: 手机机身码(IMEI) HOT 1
- 我有更好的正则:手机号(严谨)
- 银行卡号校验错误❌(10到30位, 覆盖对公/私账户)河北省的对公账户匹配不上
- 我有更好的正则: 网址(URL)
- 增加特种汽车的车牌号有校验
- 我有更好的正则: ip-v4[:端口] HOT 1
- 我有更好的正则: 日期(严谨, 支持闰年判断)
- 我有更好的正则: ip-v4[:端口](只是前面的部分,不包括端口)
- 我有更好的正则: 包含emoji HOT 1
- 我有更好的正则:微信
- 不能使用特殊字符
- 「优化」座机正则表达式存在冗余
- 【车牌】新能源有已经有九位数的了
- 我有更好的正则: 车牌号(新能源),南京的新能源牌照已经不是D和F开头的了,已经出现A开头的了,所以建议修改(我的可能有bug,建议官方可以测试下,并更新)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from any-rule.