feat: 增加base64格式

This commit is contained in:
宁宁 2019-07-05 08:57:39 +08:00
parent 056a08ab47
commit 406171ac1a
2 changed files with 155 additions and 146 deletions

View File

@ -1,6 +1,11 @@
# 正则大全 # 正则大全
图形界面: https://any86.github.io/any-rule/ 图形界面: https://any86.github.io/any-rule/
## base64格式
```javascript
/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*?)\s*$/i
```
## 银行卡号16或19位 ## 银行卡号16或19位
```javascript ```javascript
/^([1-9]{1})(\d{15}|\d{18})$/ /^([1-9]{1})(\d{15}|\d{18})$/

View File

@ -1,4 +1,8 @@
module.exports = [ module.exports = [{
title: 'base64格式',
rule: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i,
example: 'data:image/gif;base64,xxxx=='
},
{ {
title: '银行卡号16或19位', title: '银行卡号16或19位',
rule: /^([1-9]{1})(\d{15}|\d{18})$/, rule: /^([1-9]{1})(\d{15}|\d{18})$/,