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