没有合适的资源?快使用搜索试试~ 我知道了~
VB用正则表达式提取网页中的链接
4星 · 超过85%的资源 需积分: 12 47 下载量 27 浏览量
2013-09-16
17:37:55
上传
评论
收藏 1KB TXT 举报
温馨提示
试读
2页
VB用正则表达式提取网页中的链接
资源推荐
资源详情
资源评论
VB用正则表达式提取网页中的链接
博客分类: VB程序设计
正则表达式VBVBScript
VBScript code
<!---->
Function getUrl(MatchStr As String) As String
Dim myReg As RegExp
Dim Matches As MatchCollection
Dim myMatch As Match
Dim strtmp As String
Dim strimg As String
Set myReg = New RegExp
With myReg
.IgnoreCase = True
.Global = True
.Pattern = "http://.+?\s" '取出里面的地址
Set Matches = .Execute(MatchStr)
End With
For Each myMatch In Matches
If Right(myMatch.Value, 2) = """ " Then
strtmp = strtmp & Left(myMatch.Value, Len(myMatch.Value) - 2) & vbCrLf
Else
strtmp = strtmp & Left(myMatch.Value, Len(myMatch.Value) - 1) & vbCrLf
End If
Next
getUrl = strtmp
End Function
VBScript code
博客分类: VB程序设计
正则表达式VBVBScript
VBScript code
<!---->
Function getUrl(MatchStr As String) As String
Dim myReg As RegExp
Dim Matches As MatchCollection
Dim myMatch As Match
Dim strtmp As String
Dim strimg As String
Set myReg = New RegExp
With myReg
.IgnoreCase = True
.Global = True
.Pattern = "http://.+?\s" '取出里面的地址
Set Matches = .Execute(MatchStr)
End With
For Each myMatch In Matches
If Right(myMatch.Value, 2) = """ " Then
strtmp = strtmp & Left(myMatch.Value, Len(myMatch.Value) - 2) & vbCrLf
Else
strtmp = strtmp & Left(myMatch.Value, Len(myMatch.Value) - 1) & vbCrLf
End If
Next
getUrl = strtmp
End Function
VBScript code
资源评论
- zcjhy2015-12-20可以做参考。
- fjqianlong2014-08-09有参考价值
- conofoyo2018-09-19有参考价值,最近还有人写vb的么
- chrishsutw2013-09-25這個比較少用到,不過還是要感謝分享!
goldstar3000
- 粉丝: 3
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功