title: Regex to change <img> relative URLs to absolute
body: <p>I need to look inside a string of HTML and change all <code>&lt;img&gt;</code> tags where the <code>src</code> attribute is a relative address, to an absolute URL. So this:</p>
  
  <pre><code>&lt;img src="puppies.jpg"&gt;
  </code></pre>
  
  <p>needs to become:</p>
  
  <pre><code>&lt;img src="http://sitename.com/path/puppies.jpg"&gt;
  </code></pre>
  
  <p>while ignoring <code>&lt;img&gt;</code> tags whose <code>src</code> attribute is already absolute.</p>
  
  <p>I'm using PHP and assume that I'll need to run this through <code>preg_replace()</code>. Help! And Thanks!</p>