1 String str="<li>申办</li><li class="arrow"></li><li>受理</li><li class="arrow"></li><li class="cb"><h2 id="chengban" class="ready">承办</h2><ul><li class="arrow-left"></li><li id="tebie" >特别程序</li><li class="arrow-right"></li></ul></li><li class="arrow"></li><li>初审</li><li class="arrow"></li><li>复审</li><li class="arrow"></li><li>决定</li><li class="arrow"></li><li>文书整理</li><li class="arrow"></li><li>制证</li><li class="arrow"></li><li>送达</li><li class="arrow"></li><li>归档</li><li class="arrow"></li><li>办结</li>"; 2 Pattern p = Pattern.compile("([\u4e00-\u9fa5]+)"); 3 Matcher matcher = p.matcher(str); 4 while(matcher.find()) { 5 System.out.print(matcher.group()+" ");; 6 }
输出结果:申办 受理 承办 特别程序 初审 复审 决定 文书整理 制证 送达 归档 办结