fix #4: 修复"网址"匹配错误

This commit is contained in:
宁宁 2019-07-04 13:42:35 +08:00
parent c2415748b6
commit 754667a655
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
# 正则大全
:whale: 图形界面: https://any86.github.io/any-rule/
# 正则大全
图形界面: https://any86.github.io/any-rule/
## 银行卡号16或19位
```javascript
@ -26,9 +26,9 @@
/^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 A-Z]{1}[A-HJ-NP-Z]{1}(([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9 挂学警港澳]{1})$/
```
## URL链接
## URL链接(网址)
```javascript
/^((https?|ftp|file):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*\/?$/
/^((https?|ftp|file):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*\/?/
```
## 手机号

View File

@ -27,8 +27,8 @@ module.exports = [
},
{
title: 'URL链接',
rule: /^((https?|ftp|file):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*\/?$/,
title: 'URL链接(网址)',
rule: /^((https?|ftp|file):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*\/?/,
example: '如: www.qq.com 、file:///C:/Users/KD/index.js'
},
{