title: How do I extract HTML img sources with a regular expression?
body: <p>I need to extract the src element from all image tags in an HTML document.</p>
  
  <p>So, the input is an HTML page and the output would be a list of URL's pointing to images:
  ex... <a href="http://www.google.com/intl/en_ALL/images/logo.gif" rel="noreferrer">http://www.google.com/intl/en_ALL/images/logo.gif</a></p>
  
  <p>The following is what I came up with so far:</p>
  
  <pre><code>&lt;img\s+src=""(http://.*?)
  </code></pre>
  
  <p>This does not work for tags where the src isn't directly after the img tag, for example:</p>
  
  <pre><code>&lt;img height="1px" src="spacer.gif"&gt;
  </code></pre>
  
  <p>Can someone help complete this regular expression? It's pretty easy, but I thought this may be a faster way to get an answer.</p>