How do I check if a string is a prefix of any possible other string that matches a given regex.

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Oct 8 23:24:50 CEST 2014


jonathan.slenders at gmail.com wrote:

>>For each non-accepting state, determine whether it has
>>any transitions that lead in one or more steps to an accepting state.
>>Modify the FSM so that each such state is also an accepting state.

> Thanks, I'll make every state of the FSM an accepting state.

Not *every* state -- that will give you an FSM that
accepts any string!

-- 
Greg



More information about the Python-list mailing list