我有這樣給出: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)。 –