我也来凑个热闹呢。
#include <array.au3>
Local $z="3",$m="4",$k="2",$l="9",$d="0",$b="5",$i="7",$w="6",$r="8",$c="1"
Local $str = _
'<tr><td width="140">IP:Port</td><td width="40">Type</td><td width="90">Speed</td><td width="160"> Country/Area</td></tr>' & @crlf & _
'<tr><td>119.82.252.7<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>219,938,938</td><td>柬埔寨</td></tr>' & @crlf & _
'<tr><td>202.43.179.182<SCRIPT type=text/javascript>document.write(":"+b+m+z+k+c)</SCRIPT></td><td>HTTP</td><td>187,953,953</td><td>印度尼西亚 MORA电信</td></tr>' & @crlf & _
'<tr><td>202.171.253.98<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT></td><td>HTTP</td><td>78,375,375</td><td>澳门 Macauweb公司</td></tr>' & @crlf & _
'<tr><td>203.66.187.246<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT></td><td>HTTP</td><td>125,844,844</td><td>台湾省 中华电信</td></tr>' & @crlf & _
'<tr><td>203.66.187.246<SCRIPT type=text/javascript>document.write(":"+r+c)</SCRIPT></td><td>HTTP</td><td>109,969,984</td><td>台湾省 中华电信</td></tr>' & @crlf & _
'<tr><td>207.211.86.196<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT></td><td>HTTP</td><td>219,875,875</td><td>United States</td></tr>' & @crlf & _
'<tr><td>41.35.48.30<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>500,1359,1390</td><td>Egypt</td></tr>' & @crlf & _
'<tr><td>41.43.31.134<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>641,1922,1953</td><td>Egypt</td></tr>' & @crlf & _
'<tr><td>41.215.247.146<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>594,1813,1813</td><td>尼日利亚</td></tr>' & @crlf & _
'<tr><td>68.71.76.242<SCRIPT type=text/javascript>document.write(":"+r+d+r+k)</SCRIPT></td><td>HTTP</td><td>266,1234,1250</td><td>United States</td></tr>' & @crlf & _
'<tr><td>80.75.15.157<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>516,1735,1750</td><td>Iran</td></tr>' & @crlf & _
'<tr><td>112.217.228.212<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>156,1000,1140</td><td>Korea</td></tr>' & @crlf & _
'<tr><td>115.124.69.58<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT></td><td>HTTP</td><td>375,1453,1468</td><td>印度尼西亚 雅加达市</td></tr>' & @crlf & _
'<tr><td>116.90.211.136<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>313,1313,1328</td><td>Indonesia</td></tr>' & @crlf & _
'<tr><td>118.96.153.254<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>453,1656,1687</td><td>Indonesia</td></tr>' & @crlf & _
'<tr><td>118.97.71.57<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>219,1016,1016</td><td>Indonesia</td></tr>' & @crlf & _
'<tr><td>118.97.170.195<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>343,1203,1750</td><td>Indonesia</td></tr>' & @crlf & _
'<tr><td>118.97.221.53<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT></td><td>HTTP</td><td>375,1406,1797</td><td>Indonesia</td></tr>' & @crlf & _
'<tr><td>122.200.54.42<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT></td><td>HTTP</td><td>485,1719,1719</td><td>Indonesia</td></tr>' & @crlf
Local $exp1 = StringRegExp($str,'(?<=<td>)[^<>]+(?=<)|(?<=write\(":"\+)[^\)]+(?=\))',3)
;Local $exp2 = StringRegExp($str,'(?<=write\(":"\+)[^\)]+(?=\))',3)
_ArrayDisplay($exp1,UBound($exp1))
Local $i
Local $aData[UBound($exp1)]
Local $n = 0
For $i = 0 To UBound($exp1) - 1 Step 5
$aData[$n] = $exp1[$i]
Local $temp1 = StringRegExpReplace($exp1[$i+1],'\w','$$0')
Local $temp2 = StringRegExpReplace($temp1,'\+','&')
$aData[$n+1] = Execute($temp2)
$aData[$n+2] = $exp1[$i+2]
$aData[$n+3] = $exp1[$i+3]
$aData[$n+4] = $exp1[$i+4]
$n = $n + 5
Next
_ArrayDisplay($aData,UBound($aData))
|