I would like to build regular expression which checks if entered string is regular expression so if it contains |, [ and then ], ( and then ) for example:
A0[1-4].*Done or (L1 | L2).*Done'
I've build something simple like this: ".[\\[]..[\\]]" but it doesn't work at all even for simple examples. I tried with Java matcher and just simple String.matches()
context-free, and regex, of course, is not context free. So, regex is not a regular language itself, so couldn't be described by regex. At the same time, Tagir's answer should suit you well.