RegexUtil class
Regex Utility.
Constructors
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 Methods
-
isDate(
String input) → bool - Returns whether the input matches the date regex with pattern 'yyyy-MM-dd'.
-
isEmail(
String input) → bool - Returns whether the input matches the email regex.
-
isIDCard(
String input) → bool - Returns whether the input matches the ID card number regex.
-
isIDCard15(
String input) → bool - Returns whether the input matches the 15-digit ID card number regex.
-
isIDCard18(
String input) → bool - Returns whether the input matches the 18-digit ID card number regex.
-
isIDCard18Exact(
String input) → bool - Returns whether the input matches the exact 18-digit ID card number regex.
-
isIP(
String input) → bool - Returns whether the input matches the IP address regex.
-
isMobileExact(
String input) → bool - Returns whether the input matches the exact mobile number regex.
-
isMobileSimple(
String input) → bool - Returns whether the input matches the simple mobile number regex.
-
isTel(
String input) → bool - Returns whether the input matches the telephone number regex.
-
isURL(
String input) → bool - Returns whether the input matches the URL regex.
-
isUsername(
String input) → bool - Returns whether the input matches the username regex.
-
isZh(
String input) → bool - Returns whether the input matches the Chinese character regex.
-
matches(
String regex, String input) → bool - Returns whether the input matches the regex pattern.
Constants
- regexChinaPostalCode → const String
- Postal code regex for China.
- regexDate → const String
- Date regex with pattern 'yyyy-MM-dd'.
- regexEmail → const String
- Email address regex.
- regexIdCard15 → const String
- ID card number regex (15 digits).
- regexIdCard18 → const String
- ID card number regex (18 digits).
- regexIp → const String
- IP address regex.
- regexMobileExact → const String
- Exact mobile number regex.
- regexMobileSimple → const String
- Simple mobile number regex.
- regexPassport → const String
- Passport regex.
- regexQQ → const String
- QQ number regex.
- regexTel → const String
- Telephone number regex.
- regexUrl → const String
- URL regex.
- regexUsername → const String
- Username regex, must contain letters and numbers, 6-18 characters.
- regexUsername2 → const String
- Username regex, must contain letters and numbers, can contain special characters, 6-18 characters.
- regexUsername3 → const String
- Username regex, must contain letters, numbers, and special characters, 6-18 characters.
- regexZh → const String
- Chinese character regex.