Documentation ¶
Overview ¶
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-07-30 17:26:07 * @FilePath: \go-toolbox\pkg\regex\any.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-07-28 21:35:12 * @FilePath: \go-toolbox\pkg\regex\vaiable.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
Index ¶
- func MatchEnCharacterDotUnderLine(str string) bool
- func RemoveSymbols(s string) string
- type AnyRegs
- func (g *AnyRegs) MatchChineseCharacter(str string) bool
- func (g *AnyRegs) MatchChineseIDCardNumber(id string) bool
- func (g *AnyRegs) MatchChinesePhoneNumber(str string) bool
- func (g *AnyRegs) MatchContainChineseCharacter(str string) bool
- func (g *AnyRegs) MatchDoubleByte(input string) bool
- func (g *AnyRegs) MatchEmail(str string) bool
- func (g *AnyRegs) MatchEmptyLine(input string) bool
- func (g *AnyRegs) MatchEnCharacter(str string) bool
- func (g *AnyRegs) MatchGeNNumber(str string, n int) bool
- func (g *AnyRegs) MatchIPv4(input string) bool
- func (g *AnyRegs) MatchIPv6(input string) bool
- func (g *AnyRegs) MatchIntOrFloat(str string) bool
- func (g *AnyRegs) MatchIsContainSpecialCharacter(str string) bool
- func (g *AnyRegs) MatchLenNNumber(str string, n int) bool
- func (g *AnyRegs) MatchLowerEnCharacter(str string) bool
- func (g *AnyRegs) MatchMNIntervalNumber(str string, m, n int) bool
- func (g *AnyRegs) MatchMNNovelsOfRealNumber(str string, m, n int) bool
- func (g *AnyRegs) MatchNLeCharacter(str string, n int) bool
- func (g *AnyRegs) MatchNNovelsOfRealNumber(str string, n int) bool
- func (g *AnyRegs) MatchNanZeroNegNumber(str string) bool
- func (g *AnyRegs) MatchNanZeroNumber(str string) bool
- func (g *AnyRegs) MatchNumber(str string) bool
- func (g *AnyRegs) MatchNumberEnCharacter(str string) bool
- func (g *AnyRegs) MatchNumberEnUnderscores(str string) bool
- func (g *AnyRegs) MatchPass1(str string, m, n int) bool
- func (g *AnyRegs) MatchPass2(str string) bool
- func (g *AnyRegs) MatchStartingWithNonZero(str string) bool
- func (g *AnyRegs) MatchTime(input string) bool
- func (g *AnyRegs) MatchUpEnCharacter(str string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchEnCharacterDotUnderLine ¶
MatchEnCharacterDotUnderLine 检查字符串是否为只包含字母、数字、点号和下划线
Types ¶
type AnyRegs ¶
type AnyRegs struct{}
func NewAnyRegs ¶
func NewAnyRegs() *AnyRegs
func (*AnyRegs) MatchChineseCharacter ¶
MatchChineseCharacter 纯汉字
func (*AnyRegs) MatchChineseIDCardNumber ¶
MatchChineseIDCardNumber 验证大陆身份证号
func (*AnyRegs) MatchChinesePhoneNumber ¶
MatchChinesePhoneNumber 大陆手机号
func (*AnyRegs) MatchContainChineseCharacter ¶
MatchContainChineseCharacter 大陆手机号
func (*AnyRegs) MatchDoubleByte ¶
MatchDoubleByte 匹配双字节字符(包括汉字在内)
func (*AnyRegs) MatchEmptyLine ¶
MatchEmptyLine 匹配零个或多个空白字符(包括空格、制表符、换页符等)
func (*AnyRegs) MatchEnCharacter ¶
MatchEnCharacter 纯英文字符串,大小写不敏感
func (*AnyRegs) MatchGeNNumber ¶
MatchGeNNumber 长度不小于n位的纯数字
func (*AnyRegs) MatchIntOrFloat ¶
MatchIntOrFloat 整数或者小数
func (*AnyRegs) MatchIsContainSpecialCharacter ¶
MatchIsContainSpecialCharacter 验证是否包含特殊字符串
func (*AnyRegs) MatchLenNNumber ¶
MatchLenNNumber 长度为n的纯数字
func (*AnyRegs) MatchLowerEnCharacter ¶
MatchLowerEnCharacter 纯小写英文字符串
func (*AnyRegs) MatchMNIntervalNumber ¶
MatchMNIntervalNumber 长度m~n位的纯数字
func (*AnyRegs) MatchMNNovelsOfRealNumber ¶
MatchMNNovelsOfRealNumber m~n位小数的正实数
func (*AnyRegs) MatchNLeCharacter ¶
MatchNLeCharacter 长度为n的字符,特殊字符除外
func (*AnyRegs) MatchNNovelsOfRealNumber ¶
MatchNNovelsOfRealNumber 有n位小数的正实数
func (*AnyRegs) MatchNanZeroNegNumber ¶
MatchNanZeroNegNumber 非零的负整数
func (*AnyRegs) MatchNanZeroNumber ¶
MatchNanZeroNumber 非零的正整数
func (*AnyRegs) MatchNumberEnCharacter ¶
MatchNumberEnCharacter 数字和26个英文字母组成的字符串,大小写不敏感
func (*AnyRegs) MatchNumberEnUnderscores ¶
MatchNumberEnUnderscores 数字和26个英文字母组成的字符串,大小写不敏感
func (*AnyRegs) MatchPass1 ¶
MatchPass1 密码1 由数字、26个英文字母或者下划线组成的英文开头的字符串, 长度m~n位
func (*AnyRegs) MatchPass2 ¶
MatchPass2 密码2 密码长度至少为8个字符。 包含至少一个小写字母。 包含至少一个大写字母。 包含至少一个数字。 包含至少一个特殊字符(例如 !@#$%^&*() 等
func (*AnyRegs) MatchStartingWithNonZero ¶
MatchStartingWithNonZero 非零开头的纯数字
func (*AnyRegs) MatchUpEnCharacter ¶
MatchUpEnCharacter 纯大写英文字符串