public void test(){ String s1 = "abcdeeeffddaafds"; String regx = "a"; Pattern p = Pattern.compile(regx); Matcher m = p.matcher(s1); while(m.find()){ System.out.println(m.group()); } }
perl 是$2,$3
正则表达式 反向引用