first try of dfa -> regex transformation