日期:2014-05-16 浏览次数:20569 次
$s =<<< HTML
<table id="TMsDt" class="TMs">
<tr>
<td class="TBdt1"><a name="TopHere" id="TopHere">商标名称</a></td>
<td class="TBdt2 tdp"><p>尚杉彩</p></td>
<td class="TBdt1">注册号/申请号</td>
<td class="TBdt3">9326603</td>
</tr>
<tr>
<td class="TBdt1">国际分类号</td>
<td class="TBdt2">14</td>
<td class="TBdt1">申请日期</td>
<td class="TBdt3">2011/4/12</td>
</tr>
</table>
HTML;
preg_match_all('#<(td)[^>]*>(.+)</\1#i', $s, $r);
print_r($r[2]);
Array
(
[0] => <a name="TopHere" id="TopHere">商标名称</a>
[1] => <p>尚杉彩</p>
[2] => 注册号/申请号
[3] => 9326603
[4] => 国际分类号
[5] => 14
[6] => 申请日期
[7] => 2011/4/12
)