Added finite automata method of string matching