public static String getMatchStr(String obj, String rgex) {
String tmp = "";
Pattern pattern = Pattern.compile(rgex);
Matcher matcher = pattern.matcher(obj);
while (matcher.find()) {
tmp = matcher.group(1);
}
return tmp;
}
通用正则匹配
最新推荐文章于 2023-09-18 11:08:01 发布