找回密码
 加入
搜索
查看: 2243|回复: 2

[效率算法] [已解决]求正则表达式

[复制链接]
发表于 2015-3-26 20:02:24 | 显示全部楼层 |阅读模式
本帖最后由 vv3509 于 2015-3-26 22:55 编辑
</div>
 <div id="boxright">
  <div class="box694">
   <h1>SOCKS4代理列表(一)</h1>
   <div class="date">发布日期:2015 - 3 - 26</div>
   <ul>
    <li><div class="ip">IP</div><div class="port">端口</div><div class="type">类型</div><div class="addr" style="text-align:center;">地址</div></li>
        <li><div class="ip">88.83.241.232</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">捷克  CZ88.NET</div></li><li><div class="ip">14.156.144.115</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">广东省东莞市 电信</div></li><li><div class="ip">61.160.131.18</div><div class="port">6023</div><div class="type">SOCKS4</div><div class="addr">江苏省无锡市 电信</div></li><li><div class="ip">59.36.115.208</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">广东省东莞市 电信</div></li><li><div class="ip">202.138.249.208</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">印度尼西亚  CZ88.NET</div></li><li><div class="ip">111.151.9.59</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">北京市 铁通IDC机房</div></li><li><div class="ip">46.48.54.30</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">俄罗斯  CZ88.NET</div></li><li><div class="ip">190.41.61.30</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">秘鲁  CZ88.NET</div></li><li><div class="ip">119.82.240.193</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">印度尼西亚  CZ88.NET</div></li><li><div class="ip">181.143.147.46</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">哥伦比亚  CZ88.NET</div></li><li><div class="ip">67.201.33.70</div><div class="port">9100</div><div class="type">SOCKS4</div><div class="addr">美国 弗吉尼亚州</div></li><li><div class="ip">41.33.238.165</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">埃及  CZ88.NET</div></li><li><div class="ip">202.138.249.215</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">印度尼西亚  CZ88.NET</div></li><li><div class="ip">46.224.1.2</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">伊朗  CZ88.NET</div></li><li><div class="ip">61.141.21.34</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">广东省汕头市 图书馆</div></li><li><div class="ip">183.136.152.68</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">浙江省宁波市 电信</div></li><li><div class="ip">202.84.44.129</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">孟加拉  CZ88.NET</div></li><li><div class="ip">213.238.174.37</div><div class="port">1081</div><div class="type">SOCKS4</div><div class="addr">土耳其  CZ88.NET</div></li><li><div class="ip">190.120.123.2</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">阿根廷  CZ88.NET</div></li><li><div class="ip">59.108.91.243</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">北京市 方正宽带</div></li><li><div class="ip">203.201.172.163</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">印度尼西亚  CZ88.NET</div></li><li><div class="ip">217.219.101.130</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">伊朗  CZ88.NET</div></li><li><div class="ip">116.55.19.208</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">云南省楚雄州 电信</div></li><li><div class="ip">120.198.150.4</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">广东省茂名市 移动</div></li><li><div class="ip">103.38.216.252</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">湖南省长沙市 环讯网络科技有限公司</div></li><li><div class="ip">178.32.77.109</div><div class="port">60088</div><div class="type">SOCKS4</div><div class="addr">法国  CZ88.NET</div></li><li><div class="ip">81.177.181.223</div><div class="port">60088</div><div class="type">SOCKS4</div><div class="addr">俄罗斯  CZ88.NET</div></li><li><div class="ip">176.100.158.109</div><div class="port">1080</div><div class="type">SOCKS4</div><div class="addr">俄罗斯  CZ88.NET</div></li>
   </ul>
  </div>
 </div>
</div>
在上面代码中提取   1.如 178.32.77.109 的ip地址
                   2.如 60088 的端口号
                   3.如 SOCKS4 的类型
谢谢!
发表于 2015-3-26 21:16:55 | 显示全部楼层
"ip">(.+?)<.+?"port">(\d+)<.+?"type">(.+?)<
 楼主| 发表于 2015-3-26 22:54:40 | 显示全部楼层
感谢A大,问题解决了!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-27 16:22 , Processed in 0.087129 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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