diff --git a/README.md b/README.md index 569c165..d5b011d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 正则大全 ![已收录70条](https://img.shields.io/badge/已收录-70条-673ab7.svg) [![版本](https://badgen.net/vs-marketplace/v/russell.any-rule)](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [![安装量](https://badgen.net/vs-marketplace/i/russell.any-rule)](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [![下载量](https://badgen.net/vs-marketplace/d/russell.any-rule)](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) ![MIT](https://img.shields.io/badge/license-MIT-F44336.svg) [![CircleCI](https://badgen.net/github/status/any86/any-rule/master/ci/circleci)](https://circleci.com/gh/any86/any-rule) +# 正则大全 ![已收录69条](https://img.shields.io/badge/已收录-69条-673ab7.svg) [![版本](https://badgen.net/vs-marketplace/v/russell.any-rule)](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [![安装量](https://badgen.net/vs-marketplace/i/russell.any-rule)](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [![下载量](https://badgen.net/vs-marketplace/d/russell.any-rule)](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) ![MIT](https://img.shields.io/badge/license-MIT-F44336.svg) [![CircleCI](https://badgen.net/github/status/any86/any-rule/master/ci/circleci)](https://circleci.com/gh/any86/any-rule) 🦕支持**web** / **vscode** / **idea** / **Alfred Workflow**多平台 @@ -272,12 +272,7 @@ vscode应用商店中搜索"**any-rule**". ### 座机(tel phone)电话(国内),如: 0341-86091234 ```javascript -/^\d{3}-\d{8}$|^\d{4}-\d{7,8}$/ -``` - -### 座机(tel phone)电话(国内), 区号可选,如: 0341-86091234 -```javascript -/^(?:\d{3}-)?\d{8}$|^(?:\d{4}-)?\d{7,8}$/ +/^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/ ``` ### 身份证号(1代,15位数字) diff --git a/package.json b/package.json index 6ff2385..8cc5026 100644 --- a/package.json +++ b/package.json @@ -219,131 +219,127 @@ }, { "command": "extension.rule39", - "title": "$(rocket) zz: 座机(tel phone)电话(国内), 区号可选,如: 0341-86091234" - }, - { - "command": "extension.rule40", "title": "$(rocket) zz: 身份证号(1代,15位数字)" }, { - "command": "extension.rule41", + "command": "extension.rule40", "title": "$(rocket) zz: 身份证号(2代,18位数字),最后一位是校验位,可能为数字或字符X" }, { - "command": "extension.rule42", + "command": "extension.rule41", "title": "$(rocket) zz: 身份证号, 支持1/2代(15位/18位数字)" }, { - "command": "extension.rule43", + "command": "extension.rule42", "title": "$(rocket) zz: 护照(包含香港、澳门)" }, { - "command": "extension.rule44", + "command": "extension.rule43", "title": "$(rocket) zz: 帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线组合" }, { - "command": "extension.rule45", + "command": "extension.rule44", "title": "$(rocket) zz: 中文/汉字" }, { - "command": "extension.rule46", + "command": "extension.rule45", "title": "$(rocket) zz: 小数" }, { - "command": "extension.rule47", + "command": "extension.rule46", "title": "$(rocket) zz: 数字" }, { - "command": "extension.rule48", + "command": "extension.rule47", "title": "$(rocket) zz: html标签(宽松匹配)" }, { - "command": "extension.rule49", + "command": "extension.rule48", "title": "$(rocket) zz: qq号格式正确" }, { - "command": "extension.rule50", + "command": "extension.rule49", "title": "$(rocket) zz: 数字和字母组成" }, { - "command": "extension.rule51", + "command": "extension.rule50", "title": "$(rocket) zz: 英文字母" }, { - "command": "extension.rule52", + "command": "extension.rule51", "title": "$(rocket) zz: 小写英文字母组成" }, { - "command": "extension.rule53", + "command": "extension.rule52", "title": "$(rocket) zz: 大写英文字母" }, { - "command": "extension.rule54", + "command": "extension.rule53", "title": "$(rocket) zz: 密码强度校验,最少6位,包括至少1个大写字母,1个小写字母,1个数字,1个特殊字符" }, { - "command": "extension.rule55", + "command": "extension.rule54", "title": "$(rocket) zz: 用户名校验,4到16位(字母,数字,下划线,减号)" }, { - "command": "extension.rule56", + "command": "extension.rule55", "title": "$(rocket) zz: ip-v4[:端口]" }, { - "command": "extension.rule57", + "command": "extension.rule56", "title": "$(rocket) zz: ip-v6[:端口]" }, { - "command": "extension.rule58", + "command": "extension.rule57", "title": "$(rocket) zz: 16进制颜色" }, { - "command": "extension.rule59", + "command": "extension.rule58", "title": "$(rocket) zz: 微信号(wx),6至20位,以字母开头,字母,数字,减号,下划线" }, { - "command": "extension.rule60", + "command": "extension.rule59", "title": "$(rocket) zz: 邮政编码(中国)" }, { - "command": "extension.rule61", + "command": "extension.rule60", "title": "$(rocket) zz: 中文和数字" }, { - "command": "extension.rule62", + "command": "extension.rule61", "title": "$(rocket) zz: 不能包含字母" }, { - "command": "extension.rule63", + "command": "extension.rule62", "title": "$(rocket) zz: java包名" }, { - "command": "extension.rule64", + "command": "extension.rule63", "title": "$(rocket) zz: mac地址" }, { - "command": "extension.rule65", + "command": "extension.rule64", "title": "$(rocket) zz: 匹配连续重复的字符" }, { - "command": "extension.rule66", + "command": "extension.rule65", "title": "$(rocket) zz: 数字和英文字母组成,并且同时含有数字和英文字母" }, { - "command": "extension.rule67", + "command": "extension.rule66", "title": "$(rocket) zz: 香港身份证 " }, { - "command": "extension.rule68", + "command": "extension.rule67", "title": "$(rocket) zz: 澳门身份证 " }, { - "command": "extension.rule69", + "command": "extension.rule68", "title": "$(rocket) zz: 台湾身份证 " }, { "command": "extension.rule.callByMenu", - "title": "🦕正则大全(70条)" + "title": "🦕正则大全(69条)" } ] }, @@ -368,4 +364,4 @@ "axios": "^0.19.2", "transliteration": "^2.1.8" } -} +} \ No newline at end of file