找回密码
 加入
搜索
查看: 5150|回复: 8

[AU3基础] 正则表达式 完成.请求帮助

  [复制链接]
发表于 2012-11-10 18:41:56 | 显示全部楼层 |阅读模式
本帖最后由 zhao_ming 于 2012-11-10 18:43 编辑



<TR>
<TD>50.22.206.179
<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT>
:80</TD>
<TD>HTTP</TD>
<TD>437,921,921</TD>
<TD>SoftLayer Tech., Dallas, Texas, US</TD></TR>
<TR>
<TD>202.152.12.77
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>359,1297,1297</TD>
<TD>Indonesia</TD></TR>
<TR>
<TD>202.162.198.178
<SCRIPT type=text/javascript>document.write(":"+r+d+d+d)</SCRIPT>
:8000</TD>
<TD>HTTP</TD>
<TD>218,1875,1875</TD>
<TD>Indonesia</TD></TR>
<TR>
<TD>202.171.253.98
<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT>
:80</TD>
<TD>HTTP</TD>
<TD>62,1640,1640</TD>
<TD>澳门 Macauweb公司</TD></TR>
<TR>
<TD>203.172.188.34
<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT>
:80</TD>
<TD>HTTP</TD>
<TD>344,1797,1797</TD>
<TD>Thailand</TD></TR>
<TR>
<TD>210.4.73.82
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>391,1891,1891</TD>
<TD>孟加拉</TD></TR>
<TR>
<TD>210.101.131.232
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>125,1469,1469</TD>
<TD>Seoul, Korea</TD></TR>
<TR>
<TD>216.244.71.143
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>235,1125,1125</TD>
<TD>美国 加利福尼亚州洛杉矶Wowrack科技公司</TD></TR>
<TR>
<TD>219.75.27.11
<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT>
:80</TD>
<TD>HTTP</TD>
<TD>344,1937,1937</TD>
<TD>新加坡 电信SINGNET</TD></TR>
<TR>
<TD>222.124.35.117
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>328,1641,1688</TD>
<TD>Indonesia</TD></TR>
<TR>
<TD>222.124.147.105
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>266,1219,1219</TD>
<TD>Indonesia</TD></TR>
<TR>
<TD>88.85.108.16
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>343,2422,2422</TD>
<TD>马其顿</TD></TR>
<TR>
<TD>89.251.103.130
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>375,2422,2422</TD>
<TD>Russia</TD></TR>
<TR>
<TD>93.91.55.65
<SCRIPT type=text/javascript>document.write(":"+r+d+r+d)</SCRIPT>
:8080</TD>
<TD>HTTP</TD>
<TD>641,2328,2328</TD>
<TD>捷克</TD></TR></TBODY></TABLE></DIV>
<DIV class=proxylistnav>
<UL>


想要的结果
50.22.206.179:80

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-11-10 18:46:00 | 显示全部楼层
不懂这东东,帮你顶下
发表于 2012-11-10 18:58:52 | 显示全部楼层
回复 1# zhao_ming

你不是已经匹配出了??
 楼主| 发表于 2012-11-10 19:09:42 | 显示全部楼层
本帖最后由 zhao_ming 于 2012-11-10 19:10 编辑

回复 3# annybaby


    <TR>
<TD>50.22.206.179
<SCRIPT type=text/javascript>document.write(":"+r+d)</SCRIPT>
:80</TD>

只取得了 50.22.206.179 后面的  :80没取出来...
发表于 2012-11-10 19:46:38 | 显示全部楼层
回复 4# zhao_ming


    先用正则删除掉ip与端口之间的无用字符,再匹配
发表于 2012-11-10 19:54:25 | 显示全部楼层

标题

回复 4# zhao_ming


    先用正则删除掉ip与端口之间的无用字符,再匹配
发表于 2012-11-10 21:31:16 | 显示全部楼层
本帖最后由 user3000 于 2012-11-10 21:48 编辑

(可以考虑同时分组捕获ip及端口:)

刚才发的有误,下面是经过调试的.
$str = ClipGet()
$a = StringRegExp($str, '(?msi)<td>(\d+\.\d+\.\d+\.\d+).+?(:\d+)</td>', 3)
_ArrayDisplay($a)
发表于 2012-11-10 21:31:49 | 显示全部楼层
((((?<=>)|\.)\d+){4})[\s\S]+?(:\d+)(?=</td)
发表于 2012-11-12 15:01:40 | 显示全部楼层
TD\>([\d\.]+)\v+\V+\v+(:[\d]+(?=<\/TD>))
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-26 21:07 , Processed in 0.078150 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表