this code get all img tags
preg_match_all('/<img[^>]+>/i',$a,$page);
but I want get tags that their filenames includes "next.gif" or "pre.gif"
for example :
$page = '
<img border="0" alt="icon" src="http://www.site.com/images/man.gif" width="90" height="90">
<img border="0" alt="icon" src="http://www.site.com/images/pre.gif" width="90" height="v">
<img border="0" alt="icon" src="http://www.site.com/images/2.gif">
<img border="0" alt="icon" src="http://www.site.com/images/next.gif" width="90" height="90">
';
and I output should be like this :
<img border="0" alt="icon" src="http://www.site.com/images/pre.gif" width="90" height="90">
<img border="0" alt="icon" src="http://www.site.com/images/next.gif" width="90" height="90">