a[ab]*b
There usually are several regular expressions that correspond to the same language
(to the same set of strings).
And there are usually several automata that correspond to the same language.
There have been several examples of this already.
From the previous question, for example, the RE a[ba]*b
would also work.
(Notice that the 'b' and 'a' are reversed inside the brackets.)
The characters inside brackets can occur in any order.
This means there can be many equivalent expressions.
For example, [wxyz]
, [xyzw]
,
[yzwx]
... and so on are all equivalent.
Write a regular expression to match the much anticipated string, "End of the Chapter".