擅长:python、mysql、java
<p>下面是这个问题的最佳答案:不要使用正则表达式来解析非正则语言,比如XML。<a href="https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454">It drove one S-O user insane.</a><a href="http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html" rel="nofollow noreferrer">Another relevant link.</a></p>