This is a very simple Aho Corasick algorithm for fast string matching implementation