Merge pull request #89 from kingmui/hotfix/match-error

fix: fix HTML comment | Tel | password matching problem
This commit is contained in:
any86 2020-04-26 17:19:04 +08:00 committed by GitHub
commit 1ea809ce50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -164,7 +164,7 @@ vscode应用商店中搜索"**any-rule**".
### html注释
```javascript
/<!--[\s\S]*?-->/
/^<!--[\s\S]*?-->$/
```
### md5格式(32位)
@ -269,7 +269,7 @@ vscode应用商店中搜索"**any-rule**".
### 座机(tel phone)电话(国内),如: 0341-86091234
```javascript
/\d{3}-\d{8}|\d{4}-\d{7}/
/^\d{3}-\d{8}$|^\d{4}-\d{7}$/
```
### 身份证号(1代,15位数字)
@ -344,7 +344,7 @@ vscode应用商店中搜索"**any-rule**".
### 密码强度校验最少6位包括至少1个大写字母1个小写字母1个数字1个特殊字符
```javascript
/^.*(?=.{6,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$/
/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
```
### 用户名校验4到16位字母数字下划线减号

View File

@ -85,7 +85,7 @@ module.exports = [{
},
{
title: 'html注释',
rule: /<!--[\s\S]*?-->/,
rule: /^<!--[\s\S]*?-->$/,
examples: ['<!--<div class="_bubble"></div>-->']
},
{
@ -191,7 +191,7 @@ module.exports = [{
},
{
title: '座机(tel phone)电话(国内),如: 0341-86091234',
rule: /\d{3}-\d{8}|\d{4}-\d{7}/,
rule: /^\d{3}-\d{8}$|^\d{4}-\d{7}$/,
examples: ['0936-4211235']
},
{
@ -267,7 +267,7 @@ module.exports = [{
},
{
title: '密码强度校验最少6位包括至少1个大写字母1个小写字母1个数字1个特殊字符',
rule: /^.*(?=.{6,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$/,
rule: /^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/,
examples: ['Kd@curry666']
},
{