Category "regular-language"

How can I add an epsilon move to FSM using Python?

I am using the greenery module to implement an FSM: from greenery import fsm, lego E, O = range(2) z, o = '0', '1' # Create the FSM machine = fsm.fsm( al

Regular expression for words not starting or ending with vowels?

I used this regex: ^[aeiou](\w|\s)*[aeiou]$ for words starting and ending with vowels and it works fine. But when I use this regex: ^[^aeiou](\w|\s)*[^aeiou]$