RegexUtil class

Regex Util.

Constructors

RegexUtil()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

cityMap Map<String, String>
final
regexChinaPostalCode String
Regex of postal code in China.
final
regexDate String
Regex of date which pattern is 'yyyy-MM-dd'.
final
regexEmail String
Regex of email.
final
regexIdCard15 String
Regex of id card number which length is 15.
final
regexIdCard18 String
Regex of id card number which length is 18.
final
regexIp String
Regex of ip address.
final
regexMobileExact String
Regex of exact mobile.
final
regexMobileSimple String
Regex of simple mobile.
final
regexPassport String
Regex of Passport.
final
regexQQ String
Regex of QQ number.
final
regexTel String
Regex of telephone number.
final
regexUrl String
Regex of url.
final
regexZh String
Regex of Chinese character.
final

Static Methods

isDate(String input) bool
Return whether input matches regex of date which pattern is 'yyyy-MM-dd'.
isEmail(String input) bool
Return whether input matches regex of email.
isIDCard(String input) bool
Return whether input matches regex of id card number.
isIDCard15(String input) bool
Return whether input matches regex of id card number which length is 15.
isIDCard18(String input) bool
Return whether input matches regex of id card number which length is 18.
isIDCard18Exact(String input) bool
Return whether input matches regex of exact id card number which length is 18.
isIP(String input) bool
Return whether input matches regex of ip address.
isMobileExact(String input) bool
Return whether input matches regex of exact mobile.
isMobileSimple(String input) bool
Return whether input matches regex of simple mobile.
isPassport(String input) bool
Return whether input matches regex of Passport.
isQQ(String input) bool
Return whether input matches regex of QQ.
isTel(String input) bool
Return whether input matches regex of telephone number.
isURL(String input) bool
Return whether input matches regex of url.
isUserName(String input, {String regex = regexUsername}) bool
Return whether input matches regex of username.
isZh(String input) bool
Return whether input matches regex of Chinese character.
matches(String regex, String input) bool

Constants

regexUsername → const String
must contain letters and numbers, 6 ~ 18. 必须包含字母和数字, 6~18.
regexUsername2 → const String
must contain letters and numbers, can contain special characters 6 ~ 18. 必须包含字母和数字,可包含特殊字符 6~18.
regexUsername3 → const String
must contain letters and numbers and special characters, 6 ~ 18. 必须包含字母和数字和殊字符, 6~18.