最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Java使用正则表达式截取重复出现的XML字符串功能示例
时间:2022-06-29 01:23:21 编辑:袖梨 来源:一聚教程网
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()); } }
输出结果: