Aho-Corasick string matching algorithm