The set of strings of balanced parens is not regular. So since you can write expressions like, (add|eijeg)|hihih, the ability to recognize balanced parens is required, and the set of all regular expressions is not regular. Therefore such a regular expression does not exist.
Name:
Anonymous2014-02-03 2:47
>>10 Not the fucking point. .* doesn't excluseively match all regexes because .* matches "\" but is not not a valid regex.
If the requirement is to create a regex that matches only regexes and not text, then it is impossible, since some (reasonably) valid text can be a (reasonably) valid regex. For example, "a".
Name:
Anonymous2014-02-11 4:53
OP said nothing about not matching anything other than regex, so /.+/