通过正则表达式查找出所有匹配字符串
Pattern pattern= Pattern.compile("abc[^0-9]");
String str="abcdawefawefabcwew";
Matcher matcher= pattern.matcher(str);
while (matcher.find()){
System.out.println(matcher.group());
}
网友评论