I mentioned regular expressions because a similar problem arises there (in regex, ".*" is the equivalent of the wildcard character "*"). I hoped you'd understand that performance issues associated with multiple occurrences of variable-length subpatterns (* in wildcards, .* in regex) are universal.