code: private static String sanitizeValueWithWildcards(String value) {
          String quoted = Pattern.quote(value);
          return quoted.replaceAll("\\*", "\\\\E.*\\\\Q");
      }
docs: Sanitizes values in order to replace any regexp-specific char sequences, except for wildcards ('*').
  First, quotes the input string to escape any regexp-specific char sequences. Second, replaces escaped wildcards
  with the appropriate char sequence. Example: "green*client" => "\Qgreen\E.*\Qclient\E".