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:
any86 2020-06-14 10:29:30 +08:00
commit 8e3df6b324
5 changed files with 25 additions and 13 deletions

View File

@ -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注释|座机|密码"等正则.

View File

@ -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
View File

@ -1,6 +1,6 @@
{
"name": "any-rule",
"version": "0.3.3",
"version": "0.3.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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条)"
}
]
},

View File

@ -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年最新公布的手机号段',