private static String wildcardToRegex(String string) {
      StringBuilder regex = new StringBuilder("^");
      StringBuilder token = new StringBuilder();
      while (!string.isEmpty()) {
        if (string.startsWith("\\%")) {
          if (!token.isEmpty()) {
            regex.append(Pattern.quote(token.toString()));
          }
          token.setLength(0);
          regex.append("%");
          string = string.replaceFirst("^\\\\%", "");
        } else if (string.startsWith("%")) {
          if (!token.isEmpty()) {
            regex.append(Pattern.quote(token.toString()));
          }
          token.setLength(0);
          regex.append(".*");
          string = string.replaceFirst("^%+", "");
        } else {
          token.append(string.charAt(0));
          string = string.substring(1);
        }
      }
      if (!token.isEmpty()) {
        regex.append(Pattern.quote(token.toString()));
      }
      regex.append('$');
      return regex.toString();
    }
Evaluates to true if the value for {@code field} tag is any of {@code exactMatches} or contains any of
{@code wildcards}.

@param values           all raw string values that were initially provided
@param exactMatches     the input {@code values} that should be treated as exact matches
@param pattern          regular expression that the value must match, or null
@param matchWhenMissing if {@code values} contained ""
planetiler-core/src/main/java/com/onthegomap/planetiler/expression/Expression.java