一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Java使用正则表达式截取重复出现的XML字符串功能示例

时间:2017-08-25 编辑:猪哥 来源:一聚教程网

publicstaticvoidmain(String[] args)throwsDocumentException {
    String s ="";
    String regEx ="";
    Pattern pat = Pattern.compile(regEx);
    Matcher mat = pat.matcher(s);
    while(mat.find()){
      System.out.println(mat.group());
    }
}

输出结果:


热门栏目