Ho fatto una ricerca ... non so se ti puo' aiutare ...

http://www.codeproject.com/KB/recipes/ahocorasick.aspx