title: Extract img src from string with preg_match_all
body: <p>I've been trying to use <code>preg_match_all</code> for 30 minutes but it looks like I can't do it.</p>
  
  <p>Basically I have a <code>$var</code> which contains a string of HTML code. For example:</p>
  
  <pre><code>&lt;br&gt;iihfuhuf
  &lt;img title="Image: http://www.jlnv2.local/temp/temp513caca536fcd.jpeg"   
   src="http://www.jlnv2.local/temp/temp513caca536fcd.jpeg"&gt;
  &lt;img src="http://www.jlnv2.local/temp/temp513caca73b8da.jpeg"&gt;&lt;br&gt;
  </code></pre>
  
  <p>I want to get the <code>src</code> attribute values of <code>img</code> tags that contain <code>/temp/temp[a-z0-9]{13}\.jpeg</code> in their <code>src</code> value.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>preg_match_all('!(&lt;img.*src=".*/temp/temp[a-z0-9]{13}\.jpeg"(.*alt=".*")?&gt;)!', $content, $matches);
  </code></pre>