日期:2014-05-20 浏览次数:20746 次
public static void main(String[] args) {
String str = "gewgAAZBBggAAqCCBBggAACqCBBggAAqCqCBB";
Pattern p = Pattern.compile("AA(?!.CC)(.*?)BB");
Matcher m = p.matcher(str);
while(m.find()){
System.out.println(m.group(1));
}
}