mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
Merge remote-tracking branch 'origin/develop'
* origin/develop: chore: 发布0.3.4 0.3.4 chore: 更新日志 docs: 更新文档 chore: 修改钩子, 提交内容的同时提交文档 fix: 修正'车牌号(新能源+非新能源)'未对长度进行限制(#107) chore: 更新主页
This commit is contained in:
commit
8e3df6b324
@ -1,6 +1,13 @@
|
||||
# 更新日志
|
||||
🚀 [提交问题](https://github.com/any86/any-rule/issues/new)
|
||||
|
||||
### 0.3.4(2020-06-14)
|
||||
- 修正"车牌号(新能源+非新能源)"未对长度进行限制.
|
||||
- 修正"身份证"中月份可以匹配00月的bug.
|
||||
- 新增"匹配连续重复的字符"正则.
|
||||
- 修正座机支持4位区号,8位电话号.
|
||||
- 修正, 根据用户需求, "qq@qq"样式的email邮箱地址不再通过验证.
|
||||
|
||||
### 0.3.3(2020-04-28)
|
||||
- 优化增加"身份证中日期的约束".
|
||||
- 优化"html注释|座机|密码"等正则.
|
||||
|
@ -237,7 +237,7 @@ vscode应用商店中搜索"**any-rule**".
|
||||
|
||||
### 车牌号(新能源+非新能源)
|
||||
```javascript
|
||||
/^(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 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})$/
|
||||
/^(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 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})$/
|
||||
```
|
||||
|
||||
### 手机号(mobile phone)中国(严谨), 根据工信部2019年最新公布的手机号段
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "any-rule",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
10
package.json
10
package.json
@ -3,10 +3,10 @@
|
||||
"publisher": "russell",
|
||||
"displayName": "any-rule",
|
||||
"description": "你要的\"正则\"都在这!",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-push": "npm run test:rules && npm run build:md && git add README.md"
|
||||
"pre-push": "npm run test:rules && npm run build:md && git add README.md && git commit -m 'docs: 更新文档'"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
@ -313,9 +313,13 @@
|
||||
"command": "extension.rule62",
|
||||
"title": "$(rocket) zz: mac地址"
|
||||
},
|
||||
{
|
||||
"command": "extension.rule63",
|
||||
"title": "$(rocket) zz: 匹配连续重复的字符"
|
||||
},
|
||||
{
|
||||
"command": "extension.rule.callByMenu",
|
||||
"title": "🦕正则大全(63条)"
|
||||
"title": "🦕正则大全(64条)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -56,12 +56,12 @@ module.exports = [{
|
||||
{
|
||||
title: 'linux文件夹路径',
|
||||
rule: /^\/(?:[^/]+\/)*$/,
|
||||
examples: ['/usr/ad/dd/', '/','/root/']
|
||||
examples: ['/usr/ad/dd/', '/', '/root/']
|
||||
},
|
||||
{
|
||||
title: 'linux文件路径',
|
||||
rule: /^\/(?:[^/]+\/)*[^/]+$/,
|
||||
examples: ['/root/b.ts','/root/abc']
|
||||
examples: ['/root/b.ts', '/root/abc']
|
||||
},
|
||||
{
|
||||
title: 'window"文件夹"路径',
|
||||
@ -161,8 +161,9 @@ module.exports = [{
|
||||
},
|
||||
{
|
||||
title: '车牌号(新能源+非新能源)',
|
||||
rule: /^(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 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})$/,
|
||||
examples: ['京A12345D', '京A00599']
|
||||
rule: /^(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领 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})$/,
|
||||
examples: ['京A12345D', '京A00599'],
|
||||
counterExamples: ['宁AD1234555555']
|
||||
},
|
||||
{
|
||||
title: '手机号(mobile phone)中国(严谨), 根据工信部2019年最新公布的手机号段',
|
||||
@ -318,11 +319,11 @@ module.exports = [{
|
||||
{
|
||||
title: 'mac地址',
|
||||
rule: /^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i,
|
||||
examples: ['38:f9:d3:4b:f5:51','00-0C-29-CA-E4-66']
|
||||
examples: ['38:f9:d3:4b:f5:51', '00-0C-29-CA-E4-66']
|
||||
},
|
||||
{
|
||||
title: '匹配连续重复的字符',
|
||||
rule: /(.)\1+/,
|
||||
examples: ['我我我','112233','11234']
|
||||
}
|
||||
];
|
||||
examples: ['我我我', '112233', '11234']
|
||||
}
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user