RegexUtils class
常见正则表达式工具类
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
-
hasMatch(
String? s, Pattern p) → bool - 判断内容是否符合正则
-
isDate(
String input) → bool - Return whether input matches regex of date which pattern is 'yyyy-MM-dd'. 返回输入是否匹配样式为'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. 返回输入是否匹配长度为15的身份证号码的正则表达式。
-
isIDCard18(
String input) → bool - Return whether input matches regex of id card number which length is 18. 返回输入是否匹配长度为18的身份证号码的正则表达式。
-
isIDCard18Exact(
String input) → bool - Return whether input matches regex of exact id card number which length is 18. 返回输入是否匹配长度为18的id卡号的正则表达式。
-
isIP(
String input) → bool - Return whether input matches regex of ip address. 返回输入是否匹配ip地址的正则表达式。
-
isMobileExact(
String input) → bool - Return whether input matches regex of exact mobile. 精确验证是否是手机号
-
isMobileSimple(
String input) → bool - Return whether input matches regex of simple mobile. 判断输入字符串是否符合手机号
-
isQQ(
String input) → bool - Return whether input matches regex of QQ. 返回是否匹配QQ的正则表达式。
-
isTel(
String input) → bool - Return whether input matches regex of telephone number. 判断返回输入是否匹配电话号码的正则表达式
-
isURL(
String input) → bool - Return whether input matches regex of url. 返回输入是否匹配url的正则表达式。
-
isUserName(
String input, {String regex = RegexConstants.REGEX_USERNAME}) → 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 - Return whether input matches the regex. 返回输入是否匹配正则表达式。