Adding assumtion that the wildcard is mostly at the end or the beginning of the pattern.