我有这样给出:PHP:查找字符串preg_match_all
<tr class="tth3">
<td>aaa - bbbbb</td>
<td>6:10 </td>
<td >bla</td>
</tr>
<tr class="tth3">
<td>cccc - xxxx</td>
<td>6:10 </td>
<td>blabla</td>
</tr>
,我会检索算法这个表达式:preg_match_all('/<tr class="tth3">.*?xxx.*?<\/[\s]*tr>/s', ...)
我的结果应该是只有谢胜利<tr>..</tr>
,但我不知道如何使用这个正确的这样谁能帮我??
欢迎来到Stack Overflow!请不要使用RegEx解析HTML,因为它会[驱动你疯狂](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) 。改为使用[HTML解析器](http://stackoverflow.com/questions/292926/robust-mature-html-parser-for-php)。 –