Comments (11)
可以, 我整理下 🐳
from any-rule.
@fariellany 应该是阔以的
from any-rule.
先把端口号加上, 做个记录
/^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*(?::[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])?\/?$/
from any-rule.
先把端口号加上, 做个记录
/^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*(?::[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])?\/?$/
这个是端口号??
from any-rule.
先把端口号加上, 做个记录
/^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*(?::[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])?\/?$/
这个是端口号??
这个是带端口号的网址, 单独端口号是这个:
/^(?:[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])$/
from any-rule.
@fariellany 但是我不打算单独收录"端口"正则, 网页上只会收录带"端口号的网址"正则
from any-rule.
@fariellany zhe这种匹配数字的正则我写了个函数, 以后可以任意匹配数字了 🐳 稍后我加到页面
from any-rule.
刚造完, 想发npm, 发现有人早就做了一个更好的, 哎
https://www.npmjs.com/package/to-regex-range
from any-rule.
来吧帮忙测测, 稳定了就发布到vscode中
from any-rule.
刚造完, 想发npm, 发现有人早就做了一个更好的, 哎
来吧帮忙测测, 稳定了就发布到vscode中
很
@fariellany zhe这种匹配数字的正则我写了个函数, 以后可以任意匹配数字了 🐳 稍后我加到页面
很不错了 大哥 谢谢
from any-rule.
@fariellany 客气 🐳
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.