private static char[] filterWildcard(char[] source) {
    char[] buffer = new char[source.length];
    int i = 0;
    for (char c : source) {
      if (c != '*') buffer[i++] = c;
    }

    return Arrays.copyOf(buffer, i);
  }
private static char[] filterWildcard(char[] source)