title: vbscript regex get img src URL
body: <p>What I am trying to do, is get the IMG SRC URL from <strong>stringXML</strong> below. (i.e. <a href="http://www.webserver.com/picture.jpg" rel="nofollow">http://www.webserver.com/picture.jpg</a>)</p>
  
  <p>This is what I have, but it is only giving me true/false:</p>
  
  <pre><code>&lt;%
  stringXML="&lt;a href="http://www.webserver.com/"&gt;&lt;img src="http://www.webserver.com/picture.jpg"/&gt;&lt;/a&gt;&lt;br&gt;Some text here, blah blah blah."
  
  Dim objRegex
      Set objRegex = New Regexp
          With objRegEx
              .IgnoreCase = True
              .Global = True  
              .Multiline = True
      End with  
  
  strRegexPattern = "\&lt;img\s[^\&gt;]*?src=[""'][^\&gt;]*?(jpg|bmp|gif)[""']"
  
  
  objRegEx.Pattern = strRegexPattern
  
          response.write objRegEx.Test(stringXML)
  
  If objRegEx.Test(stringXML) = True Then
      'The string has a tags.
  
      'Match all A Tags
      Set objRegExMatch = objRegEx.Execute(stringXML)
  
      If objRegExMatch.Count &gt; 0 Then
          Redim arrAnchor(objRegExMatch.Count - 1)
          For Each objRegExMatchItem In objRegExMatch
            response.write objRegExMatchItem.Value
          Next
      End If
  End If
  %&gt;
  </code></pre>
  
  <p>I basically want to ONLY get the IMG SRC value..</p>
  
  <p>Any ideas why this line isn't working 'response.write objRegExMatchItem.Value'?</p>
  
  <p>Cheers,
  Drew</p>