程序包 com.ajaxjs.util
类 RegExpUtils
java.lang.Object
com.ajaxjs.util.RegExpUtils
正则表达式工具类
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static PatterngetPattern(String regexp) static booleanstatic booleanstatic String使用正则的快捷方式static String使用正则的快捷方式。static String[]regMatchAll(String regexp, String str) 返回所有匹配项static boolean
-
构造器详细资料
-
RegExpUtils
public RegExpUtils()
-
-
方法详细资料
-
isMatch
-
regMatch
使用正则的快捷方式。可指定分组- 参数:
regexp- 正则str- 测试的字符串groupIndex- 分组 id,若为 -1 则取最后一个分组- 返回:
- 匹配结果
-
regMatch
使用正则的快捷方式- 参数:
regexp- 正则str- 测试的字符串- 返回:
- 匹配结果,只有匹配第一个
-
regMatchAll
返回所有匹配项- 参数:
regexp- 正则str- 测试的字符串- 返回:
- 匹配结果
-
getPattern
-
match
-
test
-