精易论坛

标题: 如何获取取中间的数据 [打印本页]

作者: misczx    时间: 2015-2-25 16:44
标题: 如何获取取中间的数据

文本_取中间文本
我测试过因为上面有相同的 所以显示不了制定的数据

不知道高如何写 求助大神   

需要读取红色标记的数据

谢谢






补充内容 (2015-2-25 16:54):
可以帮忙写出代码吗  谢谢

QQ截图20150225163149.gif (29.25 KB, 下载次数: 0)

QQ截图20150225163149.gif

作者: 宇智波·流氓    时间: 2015-2-25 16:45
正则啊
作者: misczx    时间: 2015-2-25 16:54
宇智波·流氓 发表于 2015-2-25 16:45
正则啊

可以帮忙写出来吗

谢谢
作者: 宇智波·流氓    时间: 2015-2-25 16:55
misczx 发表于 2015-2-25 16:54
可以帮忙写出来吗

谢谢

没地址 你让我看着图片抄 啊?
作者: misczx    时间: 2015-2-25 17:03
<tr><td colspan=2><table border=0 align=center cellspacing=1 cellpadding=5 width='100%'><tr><td class=left2>WAN1:</td><td class=right><div style='font-weight:bold;display:inline;'>eth1/[email protected]/255.255.255.0</div><div style='padding-top:1px;color:#a1a1a1;'>Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)</div></td><td class=right_nop width=32 align=center></td><td class=right_nop width=32 align=center><a href='show_graph.pl?name=wan1' target=_blank><img src='../images/count.gif'></a></td></tr></table></td></tr>
        </table>
<div style='padding:10px;'></div>
<table width="100%" align=center cellspacing=1 cellpadding=5 border=0 class=mytb><tr class=top><td colspan=2> 系统状态 </td></tr>        <tr><td class=left2 width=22%>主机名:</td>
                <td class=right>hsrouter.example.com</td>
        </tr>
        <tr><td class=left2 width=22%>系统版本:</td>
                <td class=right><b><a href='soft_upgrade.pl'>V8.0 Build20141121 </a></b> &nbsp;(发布于 2014-11-21 17:41:33)</td>
        </tr>
        <tr><td class=left2 width=22%>内核版本:</td>
                <td class=right>2.6.32.15 &nbsp;<a href='sys_bootparam.pl'>[单核]</a>&nbsp; (编译于 2012-10-26 09:17:15) </td>
        </tr>
        <tr><td class=left2 width=22%>运行时间:</td>
                <td class=right><b>1 小时 3 分 5 秒</b> (启动于 2015-02-25 15:27:07)</td>
        </tr>
        <tr><td class=left2 width=22%>会话数:</td>
                <td class=right><a href='info_natstat.pl'>19</a>, &nbsp; 在线用户: 0, &nbsp; 活动用户: 0, &nbsp; PPP用户: 0</td>
        </tr>
        <tr><td class=left2 width=22%>平均负载:</td>
                <td class=right>1分钟前: <font color=green>0.01</font> , &nbsp;5分钟前: <font color=green>0.01</font> , &nbsp;15分钟前: <font color=green>0.00</font></td>
        </tr>
        <tr><td class=left2 width=22%>进程状态:</td>
                <td class=right>活动: 1, &nbsp;睡眠: 87, &nbsp;停止: 0, &nbsp;僵死: 0</td>
        </tr>
</table>
<div style='padding:10px;'></div><table width="100%" align=center cellspacing=1 cellpadding=5 border=0 class=mytb>
<tr class=title align=right>




抱歉因为是内网所以只有复制了
作者: misczx    时间: 2015-2-25 17:10
misczx 发表于 2015-2-25 16:54
可以帮忙写出来吗

谢谢

已贴出  谢谢
作者: 宇智波·流氓    时间: 2015-2-25 17:19
5552.zip (141.34 KB, 下载次数: 9)
作者: misczx    时间: 2015-2-25 19:05
宇智波·流氓 发表于 2015-2-25 17:19

亲这些数据是网页获取的  他是可以变的啊
作者: 宇智波·流氓    时间: 2015-2-25 19:21
misczx 发表于 2015-2-25 19:05
亲这些数据是网页获取的  他是可以变的啊

你把那个总文本改成访问你要取得那个网址
作者: 旪彯っ旪楿儭    时间: 2015-2-25 20:03
已经完整取出   剩下的自己修改吧..

QQ截图20150225200125.jpg (53.25 KB, 下载次数: 0)

QQ截图20150225200125.jpg

Desktop.zip

504.07 KB, 下载次数: 4, 下载积分: 精币 -2 枚


作者: misczx    时间: 2015-2-25 20:52



这才是我想要的功能,,,,

我已经做出来了

感谢大神

作者: 戒卜掉思恋    时间: 2015-2-25 21:13
正则表达式  或者是精易模块的    取中间文本




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4