Aho-Corasick search on generic alphabets.