feat: issue#7 增加对semver版本号格式的支持

This commit is contained in:
宁宁 2019-07-10 16:36:05 +08:00
parent f5ed09ec22
commit 2841550f26
2 changed files with 23 additions and 13 deletions

View File

@ -1,6 +1,11 @@
# 正则大全
图形界面: https://any86.github.io/any-rule/
## 版本号格式必须为X.Y.Z
```javascript
/^\d+(\.\d+){2}$/
```
## 视频链接地址(视频格式可按需增删)
```javascript
/^https?:\/\/.*?(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4)$/i

View File

@ -1,4 +1,9 @@
module.exports = [{
title: '版本号格式必须为X.Y.Z',
rule: /^\d+(\.\d+){2}$/,
example: '如: 16.3.10'
},
{
title: '视频链接地址(视频格式可按需增删)',
rule: /^https?:\/\/.*?(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4)$/i,
example: '如: http://www.abc.com/video/wc.avi'
@ -132,7 +137,7 @@ module.exports = [{
},
{
title: '纯数字',
rule:/^\d{1,}$/,
rule: /^\d{1,}$/,
example: '如: 12345678'
},
{