$re = '/(https?:\/\/.*\.(?:png|jpg))/i';
$str = ' "<div id=\\"node-3514\\" class=\\"node node-pepite-tech node-promoted clearfix\\">\\n\\n \\n <h2><a href=\\"/startup-de-la-french-tech/beeleev\\">Beeleev</a></h2>\\n \\n \\n <div class=\\"content\\">\\n <div class=\\"field field-name-field-screenshot field-type-image field-label-hidden\\"><div class=\\"field-items\\"><div class=\\"field-item even\\">https://www.lespepitestech.s3-eu-west-1.amazonaws.com/s3fs-public/styles/large/public/beeleev.png?itok=zTcdZQQX</div></div></div> </div>\\n\\n <ul class=\\"links inline\\"><li class=\\"comment_forbidden first last\\"><span><a href=\\"/se-connecter?destination=node/3514%23comment-form\\">Connectez-vous</a> ou <a href=\\"/creer-un-compte?destination=node/3514%23comment-form\\">inscrivez-vous</a> pour publier un commentaire</span></li>\\n</ul>\\n \\n</div>\\n"';
preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php