An initial attempt to solve the wildcard matching problem, too slow for large data set.