docs: public static PatternMatcher compile(String pattern) {
      String p = pattern;
      boolean ignoreCase = false;
      if (p.startsWith("(?i)")) {
        ignoreCase = true;
        p = pattern.substring(4);
      }
      if (p.length() > 0) {
        p = "^.*(" + p + ").*$";
      }
      Parser parser = new Parser(PatternUtils.expandEscapedChars(p));
      Matcher m = Optimizer.optimize(parser.parse());
      return ignoreCase ? m.ignoreCase() : m;
    }