mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
chore: 更新文档
This commit is contained in:
parent
ad6ec26f4d
commit
d88ee6bc61
173
README.md
173
README.md
@ -1,86 +1,84 @@
|
|||||||
# 正则大全  [](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [](https://marketplace.visualstudio.com/items?itemName=russell.any-rule)  [](https://circleci.com/gh/any86/any-rule)
|
# 正则大全  [](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [](https://marketplace.visualstudio.com/items?itemName=russell.any-rule) [](https://marketplace.visualstudio.com/items?itemName=russell.any-rule)  [](https://circleci.com/gh/any86/any-rule)
|
||||||
|
|
||||||
🦕支持**web** / **vscode** / **idea** 多平台
|
🦕支持**web** / **vscode** / **idea** / **Alfred Workflow**多平台
|
||||||
|
|
||||||
## 🔥 2020-04-21 新增idea版本
|
## :rocket:web版本
|
||||||
|
https://any86.github.io/any-rule/
|
||||||
### 安装
|
|
||||||
IDEA应用商店中搜索"**any-rule**".
|
## 🍭vscode插件
|
||||||
|
|
||||||
感谢[Olange](https://github.com/zhoriya)的辛勤的付出. 具体使用说明请浏览[他的仓库](https://github.com/zhoriya/idea-rule), 记得帮他star哦.
|
### 安装
|
||||||
|
vscode应用商店中搜索"**any-rule**".
|
||||||
## :rocket:web版本
|
|
||||||
https://any86.github.io/any-rule/
|
### 使用
|
||||||
|
**方式1:**
|
||||||
## 🍭vscode插件
|
|
||||||
|
1. 按**F1**(mac下fn+F1)打开正则列表.
|
||||||
### 安装
|
2. **输入关键词搜索**, 比如"手机".
|
||||||
vscode应用商店中搜索"**any-rule**".
|
|
||||||
|

|
||||||
### 使用
|
|
||||||
**方式1:**
|
**方式2:**
|
||||||
|
|
||||||
1. 按**F1**(mac下fn+F1)打开正则列表.
|
右键选择"🦕正则大全".
|
||||||
2. **输入关键词搜索**, 比如"手机".
|
|
||||||
|

|
||||||

|
|
||||||
|
**方式3:**
|
||||||
**方式2:**
|
|
||||||
|
在代码任意位置输入"**@zz**".
|
||||||
右键选择"🦕正则大全".
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**方式3:**
|
## 👩🏫图解正则
|
||||||
|
<details>
|
||||||
在代码任意位置输入"**@zz**".
|
<summary>查看详情</summary>
|
||||||
|
每次在any-rule中选择正则后会弹出提示, 可点击"🤖图解正则".
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 👩🏫图解正则
|
点击后可以看到正则解析, 方便大家学习.
|
||||||
<details>
|
|
||||||
<summary>查看详情</summary>
|

|
||||||
每次在any-rule中选择正则后会弹出提示, 可点击"🤖图解正则".
|
|
||||||
|
**注意**: 图解直接使用了https://regexper.com, 在此对作者表示敬意和感谢.
|
||||||

|
</details>
|
||||||
|
|
||||||
点击后可以看到正则解析, 方便大家学习.
|
## 社区版本
|
||||||
|
[idea版](https://github.com/zhoriya)
|
||||||

|
|
||||||
|
[Alfred Workflow版](https://github.com/cccyb/workflows)
|
||||||
**注意**: 图解直接使用了https://regexper.com, 在此对作者表示敬意和感谢.
|
|
||||||
</details>
|
## :fire:关于PR
|
||||||
|
欢迎大家PR, 步骤如下:
|
||||||
## :fire:关于PR
|
1. **正则**请在**packages/www/src/RULES.js**中添加.
|
||||||
欢迎大家PR, 步骤如下:
|
2. 运行`npm run test:rules`进行测试.
|
||||||
1. **正则**请在**packages/www/src/RULES.js**中添加.
|
3. 运行`npm run build:md`更新**README.md**.
|
||||||
2. 运行`npm run test:rules`进行测试.
|
4. 请务必提交到**develop**分支.
|
||||||
3. 运行`npm run build:md`更新**README.md**.
|
|
||||||
4. 请务必提交到**develop**分支.
|
在此感谢大家对**any-rule**做出的贡献!
|
||||||
|
|
||||||
在此感谢大家对**any-rule**做出的贡献!
|
## 👽主要开发者
|
||||||
|
按照加入时间排序
|
||||||
## 👽主要开发者
|
<table>
|
||||||
按照加入时间排序
|
<tr>
|
||||||
<table>
|
<td>
|
||||||
<tr>
|
<a href="https://github.com/MrTenger"><img width="60" src="https://avatars3.githubusercontent.com/u/10781715?s=60&v=4"></a>
|
||||||
<td>
|
</td>
|
||||||
<a href="https://github.com/MrTenger"><img width="60" src="https://avatars3.githubusercontent.com/u/10781715?s=60&v=4"></a>
|
<td>
|
||||||
</td>
|
<a href="https://github.com/giraffeComing"><img width="60" src="https://avatars2.githubusercontent.com/u/14800669?s=460&v=4"></a>
|
||||||
<td>
|
</td>
|
||||||
<a href="https://github.com/giraffeComing"><img width="60" src="https://avatars2.githubusercontent.com/u/14800669?s=460&v=4"></a>
|
<td>
|
||||||
</td>
|
<a href="https://github.com/microud"><img width="60" src="https://avatars1.githubusercontent.com/u/10163257?s=60&v=4"></a>
|
||||||
<td>
|
</td>
|
||||||
<a href="https://github.com/microud"><img width="60" src="https://avatars1.githubusercontent.com/u/10163257?s=60&v=4"></a>
|
<td>
|
||||||
</td>
|
<a href="https://github.com/52cik"><img width="60" src="https://avatars0.githubusercontent.com/u/5033310?s=60&v=4"></a>
|
||||||
<td>
|
</td>
|
||||||
<a href="https://github.com/52cik"><img width="60" src="https://avatars0.githubusercontent.com/u/5033310?s=60&v=4"></a>
|
</tr>
|
||||||
</td>
|
</table>
|
||||||
</tr>
|
|
||||||
</table>
|
## 🍔正则
|
||||||
|
|
||||||
## 🍔正则
|
|
||||||
|
|
||||||
### 火车车次
|
### 火车车次
|
||||||
```javascript
|
```javascript
|
||||||
@ -279,12 +277,12 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
|
|
||||||
### 身份证号(2代,18位数字),最后一位是校验位,可能为数字或字符X
|
### 身份证号(2代,18位数字),最后一位是校验位,可能为数字或字符X
|
||||||
```javascript
|
```javascript
|
||||||
/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0\d|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/
|
/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/
|
||||||
```
|
```
|
||||||
|
|
||||||
### 身份证号, 支持1/2代(15位/18位数字)
|
### 身份证号, 支持1/2代(15位/18位数字)
|
||||||
```javascript
|
```javascript
|
||||||
/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/
|
/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/
|
||||||
```
|
```
|
||||||
|
|
||||||
### 护照(包含香港、澳门)
|
### 护照(包含香港、澳门)
|
||||||
@ -396,3 +394,8 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
```javascript
|
```javascript
|
||||||
/^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i
|
/^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 匹配连续重复的字符
|
||||||
|
```javascript
|
||||||
|
/(.)\1+/
|
||||||
|
```
|
||||||
|
@ -24,14 +24,7 @@ const badges = [
|
|||||||
|
|
||||||
let content = `# 正则大全 ${badges.join(' ')}
|
let content = `# 正则大全 ${badges.join(' ')}
|
||||||
|
|
||||||
🦕支持**web** / **vscode** / **idea** 多平台
|
🦕支持**web** / **vscode** / **idea** / **Alfred Workflow**多平台
|
||||||
|
|
||||||
## 🔥 2020-04-21 新增idea版本
|
|
||||||
|
|
||||||
### 安装
|
|
||||||
IDEA应用商店中搜索"**any-rule**".
|
|
||||||
|
|
||||||
感谢[Olange](https://github.com/zhoriya)的辛勤的付出. 具体使用说明请浏览[他的仓库](https://github.com/zhoriya/idea-rule), 记得帮他star哦.
|
|
||||||
|
|
||||||
## :rocket:web版本
|
## :rocket:web版本
|
||||||
https://any86.github.io/any-rule/
|
https://any86.github.io/any-rule/
|
||||||
@ -76,6 +69,11 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
**注意**: 图解直接使用了https://regexper.com, 在此对作者表示敬意和感谢.
|
**注意**: 图解直接使用了https://regexper.com, 在此对作者表示敬意和感谢.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## 社区版本
|
||||||
|
[idea版](https://github.com/zhoriya)
|
||||||
|
|
||||||
|
[Alfred Workflow版](https://github.com/cccyb/workflows)
|
||||||
|
|
||||||
## :fire:关于PR
|
## :fire:关于PR
|
||||||
欢迎大家PR, 步骤如下:
|
欢迎大家PR, 步骤如下:
|
||||||
1. **正则**请在**packages/www/src/RULES.js**中添加.
|
1. **正则**请在**packages/www/src/RULES.js**中添加.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user