updated to use the latest version of regex2nfa