mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 07:38:58 +08:00
feat: 新增"域名"正则(#232)
This commit is contained in:
parent
a2a28b8dec
commit
f762c31942
12
packages/www/src/RULES.js
vendored
12
packages/www/src/RULES.js
vendored
@ -434,5 +434,17 @@ module.exports = [{
|
||||
rule: /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
|
||||
examples: ['90203918@qq.com', 'nbilly@126.com', '啦啦啦@126.com']
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
title: '域名(非网址, 不包含协议)',
|
||||
rule: /^([0-9a-zA-Z-]{1,}\.)+([a-zA-Z]{2,})$/,
|
||||
examples: ['www.baidu.com',
|
||||
'baidu.com',
|
||||
'baidu.com.cn',
|
||||
'api.baidu.com',
|
||||
'nodejs.org',
|
||||
'nodejs.cn'],
|
||||
counterExamples: ['http://baidu.com', 'https://baidu.com', 'www.百度.com']
|
||||
}
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user