Can a regular expression itself be parsed with a regular expression?

This question already has an answer here:

  • Is there a regular expression to detect a valid regular expression? 8 answers

  • You cannot parse nested parentheses with a regular expression because you would need infinite state to do so. So the answer is no. What you are looking for is called context-free grammars.

    链接地址: http://www.djcxy.com/p/28866.html

    上一篇: iOS UIWebView在尝试请求url时崩溃

    下一篇: 正则表达式本身可以用正则表达式解析吗?