【www.bbyears.com--正则表达式】
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()); } }
输出结果: