A simple DFA regex engine