You have a dictionary and are checking to see if the word you have is an anagram of something? If so, for each word you could generate a UDT which keeps track of the total number of letters in the word, and the number of each letter. Checking for anagrams using these constructs would be quite quick, and dealing with wildcards would be trivial. Optimizations are readily possible, too, using the length of each word.