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());
}
}
输出结果: