mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
Merge branch 'master' into develop
This commit is contained in:
commit
55774c177a
19
README.md
19
README.md
@ -1,4 +1,4 @@
|
|||||||
# 正则大全  [](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插件**2种查询方式.
|
支持**web** / **vscode插件**2种查询方式.
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
|
|
||||||
### 网址(支持端口和"?+参数"和"#+参数)
|
### 网址(支持端口和"?+参数"和"#+参数)
|
||||||
```javascript
|
```javascript
|
||||||
/^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/
|
/^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?$/
|
||||||
```
|
```
|
||||||
|
|
||||||
### 统一社会信用代码
|
### 统一社会信用代码
|
||||||
@ -121,12 +121,17 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
|
|
||||||
### linux"隐藏文件"路径
|
### linux"隐藏文件"路径
|
||||||
```javascript
|
```javascript
|
||||||
/^\/(?:[^/]+\/)*\.[^/]*/
|
/^\/(?:[^\/]+\/)*\.[^\/]*/
|
||||||
```
|
```
|
||||||
|
|
||||||
### linux"文件(夹)"路径
|
### linux文件夹路径
|
||||||
```javascript
|
```javascript
|
||||||
/^\/[\s\S]+/
|
/^\/(?:[^\/]+\/)*$/
|
||||||
|
```
|
||||||
|
|
||||||
|
### linux文件路径
|
||||||
|
```javascript
|
||||||
|
/^\/(?:[^\/]+\/)*[^\/]+$/
|
||||||
```
|
```
|
||||||
|
|
||||||
### window"文件夹"路径
|
### window"文件夹"路径
|
||||||
@ -186,7 +191,7 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
|
|
||||||
### base64格式
|
### base64格式
|
||||||
```javascript
|
```javascript
|
||||||
/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i
|
/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*?)\s*$/i
|
||||||
```
|
```
|
||||||
|
|
||||||
### 数字/货币金额(支持负数、千分位分隔符)
|
### 数字/货币金额(支持负数、千分位分隔符)
|
||||||
@ -251,7 +256,7 @@ vscode应用商店中搜索"**any-rule**".
|
|||||||
|
|
||||||
### email(邮箱)
|
### email(邮箱)
|
||||||
```javascript
|
```javascript
|
||||||
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
|
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
|
||||||
```
|
```
|
||||||
|
|
||||||
### 座机电话(国内),如: 0341-86091234
|
### 座机电话(国内),如: 0341-86091234
|
||||||
|
@ -54,9 +54,14 @@ module.exports = [{
|
|||||||
examples: ['/usr/ad/.dd', '/root/.gitignore', '/.gitignore']
|
examples: ['/usr/ad/.dd', '/root/.gitignore', '/.gitignore']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'linux"文件(夹)"路径',
|
title: 'linux文件夹路径',
|
||||||
rule: /^\/[\s\S]+/,
|
rule: /^\/(?:[^/]+\/)*$/,
|
||||||
examples: ['/usr/ad/dd/', '/root/b.ts','/root/abc']
|
examples: ['/usr/ad/dd/', '/','/root/']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'linux文件路径',
|
||||||
|
rule: /^\/(?:[^/]+\/)*[^/]+$/,
|
||||||
|
examples: ['/root/b.ts','/root/abc']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'window"文件夹"路径',
|
title: 'window"文件夹"路径',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user