Page 1 of 1

Problem with preg_match_all

Posted: Wed Jun 25, 2008 10:36 am
by hackerman
I'm a PHP programmer few years, but I sill have problems with regular expression functions.

Code: Select all

 
$k = preg_match_all('@(<div class="thumbpart"><img src=")(.*)(" id=")(.*)(" /></div>)@msU', $file, $matches);
 
It returns me that HTML code, but there is more atributes than I indicated. I want just src and id atributes, but it returns alt, title etc. too.