Can a regular expression itself be parsed with a regular expression?
This question already has an answer here:
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下一篇: 正则表达式本身可以用正则表达式解析吗?