1.采用正则表达式进行匹配的例子:

 import java.util.regex.Matcher;
 import java.util.regex.Pattern; 

 reader = new FileReader(filename);
  br = new BufferedReader(reader);

  p_str = ".*(第[^章条边节]+[章边节])(.*)";
  pattern = Pattern.compile(p_str);
  matcher = pattern.matcher(text);
  if (matcher.find())
  {
    str_tmp = matcher.group(1).trim();
    temp = matcher.group(2).trim();
    str_tmp = "<font class="capter1">" + text + "</font>";
  }

2.正则表达式匹配中文的问题:

  ^[u4E00-u9FA5]+$