Is it possible to determine if a given string is a valid regular expression using only regular expressions?
Let's say I have a few lines, which may or may not be valid regular expressions. I would like the regular expression to match the string matching the actual regular expression. Is it possible? Or am I using any higher level grammar (i.e. contextual free language) to detect this? Does it affect if I use an extended version of regular expressions like Perl regular expressions?
If possible, then what regexp regular expression matches?
computer-science regex regular-language
Juha syrjälä
source share