2L正解,得到正确结果,3Q
public static void main(String[] args) {
String s = "<111>222<123>333<444>555";
Pattern p = Pattern.compile("<(?!123>)[^>]*>");
Matcher m = p.matcher(s);
while (m.find()) {
System.out.println(m.group());
}
}
public static void main(String[] args) {
String s = "<111>222<123>333<444>555";
Pattern p = Pattern.compile("<(?!123>)[^>]*>");
Matcher m = p.matcher(s);
while (m.find()) {
System.out.println(m.group());
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货