Regexp that matches valid regexps

前端 未结 7 1173
北荒
北荒 2020-12-03 02:38

Is there a regular expression that matches valid regular expressions?

(I know there are several flavors of regexps. One would do.)

7条回答
  •  萌比男神i
    2020-12-03 03:31

    You probably need a parser, not a regex. Regexes are powerful tools, but are not parsing tools. They are not well suited to nested grammars, for example.

提交回复
热议问题