string searching with BMH algorithm and wildcards