private static Pattern sanitizeRule(String rule) {
    return Pattern.compile(rule.startsWith("/") ? rule.substring(1) : "^" + rule + "$", Pattern.CASE_INSENSITIVE);
  }
private static Pattern sanitizeRule(String rule)