Re: [VB.NET express 2005] - Regular expressions

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Movie Maniac®" <isotopiPUSSAVIABRUTTOSPIDER@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> schrieb:
Private Function findImgTags(ByVal strHTML As String) As Object
dim MatchObj As Match = Regex.Match(strHTML, "<img[^>]*>", RegexOptions.IgnoreCase)
return MatchObj
End Function


This should return an object containing all the img tags, unfortunately returns only the first img :(

Use 'Regex.Matches' instead of 'Regex.Match'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


.


Quantcast