Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27192

VS 2010 Regex help extracting from table

$
0
0
Hey Guys,

I'm having trouble wiht a small line of regex, i'm trying to parse the url from:

Code:

<td class="field_domain"><a href="/goto/16/akl4d/48/" target="_blank" rel="nofollow" title="site.com">site.com</a></td>
My latest attempt is:

Code:

        Dim urlSource As New Regex("(?<=""field_domain"" .*?title="").*?(?="")", RegexOptions.IgnoreCase Or RegexOptions.Singleline)
        Dim matches As MatchCollection = urlSource.Matches(WebBrowser.DocumentText)
        Dim urlMatch As String = String.Empty
        For Each sourceMatch As Match In matches
            urlMatch = matches(0).ToString
            MessageBox.Show(urlMatch)
        Next

But this doesn't seem to work, any help would be appreciated!

cheers guys

Graham

Viewing all articles
Browse latest Browse all 27192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>