日期:2014-05-20 浏览次数:21014 次
public class Test { public static void main(String[] args) { String str = "go go"; String r5 = "\\b(?<Word>\\w+)\\b\\s+\\k<Word>\\b"; System.out.println(str.matches(r5)); } }