regex to nfa final