S
S
Sirion2013-01-26 10:48:02
Regular Expressions
Sirion, 2013-01-26 10:48:02

Regexp to check for regexp

Is there a regular expression that checks if a given string is a regular expression?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
0
0re1, 2013-01-26
@Sirion

It is impossible, because to check the regular expression it is necessary to check the balance of bracket sequences, which are not described by regular grammars.

A
Alexey Huseynov, 2013-01-26
@kibergus

And for what? Wouldn't it be easier to take and try to compile this line as a regular expression?

S
super, 2013-01-26
@super

Absolutely any string, even an empty one, is a regular expression.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question