string-aho_corasick: rewritten