Documentation ¶
Index ¶
Constants ¶
const MatchBankCard = `^[a-zA-Z0-9]{16,50}$`
银行卡
const MatchContent = `^[!@#$%^&*\(\)_+~\{\}\[\]\<\>\,\.\?\/a-zA-Z0-9\p{Han}]+$`
匹配内容
const MatchEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*`
MatchEmail source = "132@12.comGKGk15@163.cn200806084S11233240697hdgsfhah假发发货" pattern = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱
const MatchIP = `^$(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`
MatchIP 匹配IP地址1 `^$(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`
const MatchIP2 = `((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)`
MatchIP2 匹配IP地址2 pattern = `((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)`
const MatchName = `^[_a-zA-Z0-9\p{Han}]*$`
MatchName source = "xx435,./$%(*(_&jgshgs发个^$%ffG返回福hjh放假啊啥UTEYgjk52RYPHFY37yy6346ferg6987sfasfxyfa" pattern = `[\p{Han}]+` //匹配连续的汉字 匹配用户昵称 ^[\u4e00-\u9fa5]{4,8}$
const MatchPhone = `1[3|5|7|8|][\d]{9}`
MatchPhone source = "13244820821HG74892109977HJA15200806084S11233240697hdgsfhah假发发货" pattern = `1[3|5|7|8|][\d]{9}` //匹配电话号码
const MatchPwd = `^[\x21-\x7E]{6,64}$`
MatchPwd 同上 const MatchPwd = `^[a-zA-Z0-9_-]{6,16}$` asc码 可视字符
const MatchTel = `^0\d{2,3}-?\d{7,8}$`
固定电话号码验证
const MatchURL = `[a-zA-Z]+://[^\s]*`
MatchURL 匹配URL `[a-zA-z]+://[^\s]*`
const MatchUrlShort = `^[^\s]+$`
MatchUrlShort 匹配短的URL
const MatchUser = `^[a-zA-Z0-9_-]{6,16}$`
MatchUser 匹配用户名或者密码 `^[a-zA-Z0-9_-]{6,16}$` 字母或者数字开头,区分大小写,最短6位最长16位
const MatchWOCode = `^[a-zA-Z0-9_-]+$`
MatchWOCode 匹配WO_CODE,
const MatchZIPCode = `[1-9][\d]5`
MatchZIPCode 匹配邮编 `[1-9][\d]5`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.