<div id="" class="">
<table align="center" width="1040" border="0" cellpadding="0" cellspacing="0" style="border-width:0px;">
<tr valign="top">
<td width="50%" style="border-width:0px;">
<table border="0" cellpadding="2" cellspacing="0" style="table-layout: fixed;">
<tr>
<td style="width:400px;"><b>商品名称</b></td>
<td style="width:100px;"><b>价格</b></td>
</tr>
<tr>
<td class="first-cell" title="ID: 2568 | 货号: INH002568"><div style="width:400px;height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">商品名称1</div></td>
<td align="right">
1111.00 <span class="noprint">
<a href="javascript:addToCart('2568');"><img src="themes/hope2013/images/btn_cart.gif" width="21" height="18" border="0" align="absmiddle" /></a>
<span>
</td>
</tr>
<tr>
<td class="first-cell" title="ID: 2459 | 货号: INH002459"><div style="width:400px;height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">商品名称2</div></td>
<td align="right">
2222.00 <span class="noprint">
<a href="javascript:addToCart('2459');"><img src="themes/hope2013/images/btn_cart.gif" width="21" height="18" border="0" align="absmiddle" /></a>
<span>
</td>
</tr>
</table>
</div>
$marray = StringRegExp($data, '<(?i)td.*?ID: (\d{1,8}).*?><(?i)div.*?>(.*?)</(?i)div>', 3)
我本意是获取商品的“ID”和“商品名称”,上面这段正则在Au3.REHelper里测试也能获取到,但是在Autoit里总是提示无效的数组。我也不知道哪里出错了,求大神指教。 |