Skip to content

Commit

Permalink
perf: 修复座机正则 表达式冗余 (any86#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
condorheroblog committed Jul 21, 2024
1 parent 43abe0f commit 4f860c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ vscode应用商店中搜索"**any-rule**".

### 座机(tel phone)电话(国内),如: 0341-86091234
```javascript
/^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/
/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/
```

### 身份证号(1代,15位数字)
Expand Down
2 changes: 1 addition & 1 deletion packages/www/src/RULES.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ module.exports = [{

{
title: '座机(tel phone)电话(国内),如: 0341-86091234',
rule: /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,
rule: /^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,
examples: ['0936-4211235', '89076543', '010-12345678-1234']
},

Expand Down

0 comments on commit 4f860c4

Please sign in to comment.