Move the processing of wildcards to the separate function.