Find images but only jpeg
<p>I am using the following to parse an html page and return the images:</p>

<pre><code>$html = file_get_html($url);

foreach($html-&gt;find('img') as $e){ 

    $image = $e-&gt;src;

            }
</code></pre>

<p>Ideally though I only want to show files with .jpg extension - I know I can probably use preg_match but is there a more efficient way?</p>
