哎,求2个正则合并成一个正则怎么写啊,谢谢
本帖最后由 cluonani 于 2013-05-13 14:40:09 编辑 这是要匹配的内容
<td class="LightRowHead">
Primary Color:
</td>
<td class="LightRow">
Multi-Color
</td>
</tr>
<tr>
<td class="DarkRowHead">
Multi Pack Indicator:
</td>
<td class="DarkRow">
No
</td>
</tr>
<tr>
<td class="LightRowHead">
Battery Type:
</td>
<td class="LightRow">
Does Not Contain a Battery
</td>
</tr>
$a = preg_match_all('/LightRowHead.*?>(.*?):.*?LightRow.*?>(.*?)</is', $content, $a);
$a = preg_match_all('/DarkRowHead.*?>(.*?):.*?DarkRow.*?>(.*?)</is', $content, $b);
$a = preg_match_all('/[LightRowHead|DarkRowHead].*?>(.*?):.*?[LightRow|DarkRow].*?>(.*?)</is', $content, $c);