62,614
社区成员
发帖
与我相关
我的任务
分享
String s = "this is a test testabcd program.";
Pattern p = Pattern.compile("test\\b");
//Pattern p = Pattern.compile("test"); //看看没有\\b结果是什么
Matcher m = p.matcher(s);
while (m.find()) {
System.out.println(m.group());
}