One way to do it is to use GNU regexp C libraries, but those may be overkill for what you want to do.

Another way is to write your own parser. For example if you enter "*Bill*" or "Bi?ll" The * means to match all characters up to the string "Bill", while the ? means to match anything for just a single character.