{w∈{a,b}∗|w has baba as a substring}
I am confused with this. How can I capture the following input for example?
aaababa
abbbaba
ababbba
ababaaaa
It seems there must always be baba in either middle or start or end. I must decide whether to put it always in start or middile or end?
Thanks