正则表达式的用法?
Dim objRegExp As RegExp
Dim objMatch As Match
Dim colMatches As MatchCollection
Dim RetStr As String
'' Create a regular expression object.
Set objRegExp = New RegExp
''Set the pattern by using the Pattern property.
objRegExp.Pattern = "<TD\swidth=""50%""><img\ssrc="".*?""\salign=""absmiddle"">\s<A\shref=""(.*?)""\starget=""_blank""><B>(.*?)</B></A></TD>"
'' Set Case Insensitivity.
objRegExp.IgnoreCase = True
''Set global applicability.
objRegExp.Global = True
''Test whether the String can be compared.
If (objRegExp.test(Text2.Text) = True) Then
''Get the matches.
Set colMatches = objRegExp.Execute(Text2.Text) '' Execute search.
For Each objMatch In colMatches '' Iterate Matches collection.
RetStr = RetStr & "Match found at position "
RetStr = RetStr & objMatch.FirstIndex & ". Match Value is ''"
RetStr = RetStr & objMatch.Value & "''." & vbCrLf
Next
Else
RetStr = "String Matching Failed"
End If
Text5.Text = RetStr
上面那段代码通过自己写的正则表达式 获取的是整个 连html标记在内的字符串
我要获取的是 objRegExp.Pattern = "<TD\swidth=""50%""><img\ssrc="".*?""\salign=""absmiddle"">\s<A\shref=""(.*?)""\starget=""_blank""><B>(.*?)</B></A></TD>"
中(.?)的内容 怎么写 ???