# About trap states when converting DFA to regular expression

If we were to have a trap state in a DFA and we are converting it to a regular expression, how exactly would I incorporate that into the regex? Let's say our language only accepts a*, and my DFA has a start state/final state with a a loop, and once I get a b it goes into a trap. Would the regex simply be a* meaning we ignore the b?

• @DavidRicherby write it as an answer so that I can accept it. – Ceelos Feb 23 '14 at 1:58

Yes, since the automaton can never accept after reading a $b$.