refactor: 新增'linux"隐藏文件"路径'(#72)

This commit is contained in:
宁宁 2020-03-09 23:49:14 +08:00
parent 3ae26610b4
commit 97866c3869
2 changed files with 11 additions and 11 deletions

View File

@ -119,14 +119,14 @@ vscode应用商店中搜索"**any-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}$/ /^(?:\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}$/
``` ```
### linux"文件"路径 ### linux"隐藏文件"路径
```javascript ```javascript
/^(\/[^/]+)+\/?$/ /^\/(?:[^/]+\/)*\.[^/]*/
``` ```
### linux"文件"路径 ### linux"文件(夹)"路径
```javascript ```javascript
/^(\/[^/]+)+$/ /^\/[\s\S]+/
``` ```
### window"文件夹"路径 ### window"文件夹"路径

View File

@ -49,14 +49,14 @@ module.exports = [{
examples: ['255.255.255.0', '255.224.0.0'] examples: ['255.255.255.0', '255.224.0.0']
}, },
{ {
title: 'linux"文件"路径', title: 'linux"隐藏文件"路径',
rule: /^(\/[^/]+)+\/?$/, rule: /^\/(?:[^/]+\/)*\.[^/]*/,
examples: ['/usr/ad/dd', '/root/','/.gitignore'] examples: ['/usr/ad/.dd', '/root/.gitignore', '/.gitignore']
}, },
{ {
title: 'linux"文件"路径', title: 'linux"文件(夹)"路径',
rule: /^(\/[^/]+)+$/, rule: /^\/[\s\S]+/,
examples: ['/usr/ad/dd/a.js', '/root/b.ts'] examples: ['/usr/ad/dd/', '/root/b.ts','/root/abc']
}, },
{ {
title: 'window"文件夹"路径', title: 'window"文件夹"路径',
@ -310,4 +310,4 @@ module.exports = [{
rule: /^([a-zA-Z_][a-zA-Z0-9_]*)+([.][a-zA-Z_][a-zA-Z0-9_]*)+$/, rule: /^([a-zA-Z_][a-zA-Z0-9_]*)+([.][a-zA-Z_][a-zA-Z0-9_]*)+$/,
examples: ['com.bbb.name'] examples: ['com.bbb.name']
} }
]; ];