code: public static Pattern stringCaseInsensitive(final String string) {
      return new Pattern() {
        @Override public int match(CharSequence src, int begin, int end) {
          return matchStringCaseInsensitive(string, src, begin, end);
        }
        @Override public String toString() {
          return string.toUpperCase();
        }
      };
    }
docs: Returns a {@link Pattern} object that matches {@code string} case insensitively.