mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
fix 子网掩码正则错误问题
This commit is contained in:
parent
9c322ba759
commit
9690773b33
128
README.md
128
README.md
@ -1,65 +1,65 @@
|
|||||||
# 正则大全  [](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** / **Alfred Workflow**多平台
|
🦕支持**web** / **vscode** / **idea** / **Alfred Workflow**多平台
|
||||||
|
|
||||||
## :rocket:web版本
|
## :rocket:web版本
|
||||||
https://any86.github.io/any-rule/
|
https://any86.github.io/any-rule/
|
||||||
|
|
||||||
## 🍭vscode插件
|
## 🍭vscode插件
|
||||||
|
|
||||||
### 安装
|
### 安装
|
||||||
vscode应用商店中搜索"**any-rule**".
|
vscode应用商店中搜索"**any-rule**".
|
||||||
|
|
||||||
### 使用
|
### 使用
|
||||||
**方式1:**
|
**方式1:**
|
||||||
|
|
||||||
1. 按**F1**(mac下fn+F1)打开正则列表.
|
1. 按**F1**(mac下fn+F1)打开正则列表.
|
||||||
2. **输入关键词搜索**, 比如"手机".
|
2. **输入关键词搜索**, 比如"手机".
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**方式2:**
|
**方式2:**
|
||||||
|
|
||||||
右键选择"🦕正则大全".
|
右键选择"🦕正则大全".
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**方式3:**
|
**方式3:**
|
||||||
|
|
||||||
在代码任意位置输入"**@zz**".
|
在代码任意位置输入"**@zz**".
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 👩🏫图解正则
|
## 👩🏫图解正则
|
||||||
<details>
|
<details>
|
||||||
<summary>查看详情</summary>
|
<summary>查看详情</summary>
|
||||||
每次在any-rule中选择正则后会弹出提示, 可点击"🤖图解正则".
|
每次在any-rule中选择正则后会弹出提示, 可点击"🤖图解正则".
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
点击后可以看到正则解析, 方便大家学习.
|
点击后可以看到正则解析, 方便大家学习.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**注意**: 图解直接使用了https://regexper.com, 在此对作者表示敬意和感谢.
|
**注意**: 图解直接使用了https://regexper.com, 在此对作者表示敬意和感谢.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 社区版本
|
## 社区版本
|
||||||
[idea版](https://github.com/zhoriya/idea-rule)
|
[idea版](https://github.com/zhoriya/idea-rule)
|
||||||
|
|
||||||
[Alfred Workflow版](https://github.com/cccyb/workflows)
|
[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**中添加.
|
||||||
2. 运行`npm run test:rules`进行测试.
|
2. 运行`npm run test:rules`进行测试.
|
||||||
3. 运行`npm run build:md`更新**README.md**.
|
3. 运行`npm run build:md`更新**README.md**.
|
||||||
4. 请务必提交到**develop**分支.
|
4. 请务必提交到**develop**分支.
|
||||||
|
|
||||||
在此感谢大家对**any-rule**做出的贡献!
|
在此感谢大家对**any-rule**做出的贡献!
|
||||||
|
|
||||||
## 🍔正则
|
## 🍔正则
|
||||||
|
|
||||||
### 火车车次
|
### 火车车次
|
||||||
```javascript
|
```javascript
|
||||||
@ -106,9 +106,9 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
/^magnet:\?xt=urn:btih:[0-9a-fA-F]{40,}.*$/
|
/^magnet:\?xt=urn:btih:[0-9a-fA-F]{40,}.*$/
|
||||||
```
|
```
|
||||||
|
|
||||||
### 子网掩码
|
### 子网掩码(不包含 0.0.0.0)
|
||||||
```javascript
|
```javascript
|
||||||
/^(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/
|
/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(255|254|252|248|240|224|192|128|0)$/
|
||||||
```
|
```
|
||||||
|
|
||||||
### linux"隐藏文件"路径
|
### linux"隐藏文件"路径
|
||||||
|
@ -48,9 +48,9 @@ module.exports = [{
|
|||||||
examples: ['magnet:?xt=urn:btih:40A89A6F4FB1498A98087109D012A9A851FBE0FC'],
|
examples: ['magnet:?xt=urn:btih:40A89A6F4FB1498A98087109D012A9A851FBE0FC'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '子网掩码',
|
title: '子网掩码(不包含 0.0.0.0)',
|
||||||
rule: /^(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/,
|
rule: /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(255|254|252|248|240|224|192|128|0)$/,
|
||||||
examples: ['255.255.255.0', '255.224.0.0']
|
examples: ['255.255.255.0', '255.255.255.255','255.240.0.0']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'linux"隐藏文件"路径',
|
title: 'linux"隐藏文件"路径',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user