public String filterText(String text) {
      StringBuilder res = new StringBuilder();
      try {
        doFilterText(pattern, text, null, res);
      }
      catch (IOException e) {
        throw new RuntimeException(e); // never thrown
      }
      return res.toString();
    }
public String filterText(String text)