1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RegEx ~ not grabbing src - need help

Discussion in 'Visual Basic .NET' started by simpleonline1234, Oct 25, 2011.

  1. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    Hey guys I'm trying to setup my RegEx to grab the link of <IMG> SRC tags.

    Right now my code doesn't do anything when I have it setup this way.

    Code:
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim net As New Net.WebClient()
            Dim src As String
            src = net.DownloadString("http://www.wikihow.com/Make-Easy-Homemade-Biscuits")
    
            ' Create a match using regular exp<B></B>ressions
            Dim m As Match = Regex.Match(src, "")
    
            ' Spit out the value plucked from the code
            RichTextBox1.Text = m.Value
    
    
        End Sub
    End Class
    Any ideas on how I can setup my regex to grab the link of the src?

    Example:

    src="this is my image"
     
  2. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,144
    Where 's the regex, it 's empty ;)

    Get a copy of RegexBuddy, it will help you a lot to learn RegEx. It also creates code code vb.net ;)
     
  3. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    Hey thank you Jazz for giving me the fishing pole and not the fish...this is this is the kind of answers I like to get. :)

    Hopefully this will hold me off for awhile until my next road block...I want you guys to know that I do normally google the hell of this stuff first before asking on forums.

    They say it takes the average person to see/hear things 7 times before they comprehend it...
     
    • Thanks Thanks x 1