title: PHP's preg_match() returns (.*?) value only
body: <p>I am struggling to get <a href="https://www.php.net/manual/en/function.preg-match.php" rel="nofollow noreferrer">preg_match</a> to return only the image URL and not the entire matched string. Do I need to use <a href="https://www.php.net/manual/en/function.preg-replace.php" rel="nofollow noreferrer">preg_replace</a> after or is that getting hacky?</p>
  <p>Possibly, would a different syntax get me what I need?</p>
  <pre><code>$source = file_get_contents('http://mysite.co.uk');
  preg_match_all(&quot;'&lt;div id=\&quot;my-div\&quot;&gt;&lt;img src=\&quot;(.*?)\&quot; /&gt;&lt;/div&gt;'&quot;, $source, $match);
  echo $match[0][0];
  </code></pre>