转换regular expression to nfa, then transfer to dfa and minimum dfa.