Let's say we want to write a regular expression that matches a string that ends with the same pattern that it begins with.
Let's say that we have an alphabet composed of the binary symbols: {0,1}
We should make a regular expression to create a language that is composed of words (W) with the following pattern:
W=w1w2w1 and w1 and w2 are words from the closure of the {0,1} alphabet.
I do not know how to approach this task. I am not convinced it is even possible because there is no way we can memorize anything inside a regex.
The only operators that we should use are the following three: -Concatenation -Star (closure) -OR