chore: 文档中增加收录条数和开源许可

This commit is contained in:
383514580 2019-07-10 23:15:51 +08:00
parent f295e1f0bd
commit 2f10bbc61d
3 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,6 @@
# 正则大全
图形界面: https://any86.github.io/any-rule/
# 正则大全 ![](https://img.shields.io/badge/已收录-44条-4caf50.svg) ![](https://img.shields.io/badge/license-MIT-F44336.svg)
:whale:图形界面: https://any86.github.io/any-rule/
## html注释
```javascript
@ -103,7 +104,7 @@
## email地址
```javascript
/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
/^[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

View File

@ -1,8 +1,10 @@
const fs = require('fs');
const chalk = require('chalk');
const json = require('../src/RULES.js');
let content = `# 正则大全
图形界面: https://any86.github.io/any-rule/\r\n`;
let content = `# 正则大全 ![](https://img.shields.io/badge/已收录-${json.length}条-4caf50.svg) ![](https://img.shields.io/badge/license-MIT-F44336.svg)
:whale:图形界面: https://any86.github.io/any-rule/\r\n
`;
json.forEach(({title, rule})=>{
content+= `\r\n## ${title}\r\n`;
content+= `\`\`\`javascript\r\n`;

View File

@ -102,7 +102,7 @@ module.exports = [
},
{
title: 'email地址',
rule: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
rule: /^[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])?)*$/,
example: '如: 90203918@qq.com、nbilly@126.com'
},
{