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

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.
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

regexChinaPostalCode → const String
Regex of postal code in China.
regexDate → const String
Regex of date which pattern is 'yyyy-MM-dd'.
regexEmail → const String
Regex of email.
regexIdCard15 → const String
Regex of id card number which length is 15.
regexIdCard18 → const String
Regex of id card number which length is 18.
regexIp → const String
Regex of ip address.
regexMobileExact → const String
Regex of exact mobile.
regexMobileSimple → const String
Regex of simple mobile.
regexPassport → const String
Regex of Passport.
regexTel → const String
Regex of telephone number.
regexUrl → const String
Regex of url.
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.
regexZh → const String
Regex of Chinese character.