推广 热搜: 公司  快速  中国  上海    未来  企业  政策  教师  系统 

vb.net提取html网址,如何提取网页代码中指定内容

   日期:2024-12-16     作者:caijiyuan    caijiyuan   评论:0    移动:http://fabua.ksxb.net/mobile/news/4440.html
核心提示:怎么提取网页代码中指定内容?某数据库网页结构如下:html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//

怎么提取网页代码中指定内容

vb.net提取html网址,如何提取网页代码中指定内容

某数据库网页结构如下

html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

2015年9月6日 17:18

农业药械: 

瞬时流量:175.30 m3/h 

累计流量:79438 m3 

程序下载到html文件中,名称为1400.html,源代码如上,现在想提取              

农业药械: 

  这一句,怎么编程

------解决思路----------------------

imports System.Text.Regularexpressions

imports System.Text

Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Mybase.Load

Dim strWeb As String = IO.File.ReadAllText(Application.StartupPath & "1400.html", Encoding.Default)

MsgBox(strWeb)

Dim re As Regex

re = New Regex("

(.*?)

", RegexOptions.IgnoreCase)

If re.IsMatch(strWeb) Then

MsgBox(re.Match(strWeb).Groups(1).Value)

End If

re = New Regex("

(.*?)

", RegexOptions.IgnoreCase)

If re.IsMatch(strWeb) Then

For Each mat As Match In re.Matches(strWeb)

MsgBox(mat.Groups(1).Value)

Next

End If

End Sub

End Class

本文地址:http://fabua.ksxb.net/news/4440.html    海之东岸资讯 http://fabua.ksxb.net/ , 查看更多

特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。

 
 
更多>同类最新资讯
0相关评论

文章列表
相关文章
最新动态
推荐图文
最新资讯
点击排行
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  粤ICP备2023022329号