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