I am trying to extract the src value from a tag, so far it seems to me that it is possible to extract a string between the src value and the final quotation mark in the string
Line
<img border="0" src="http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif" width="89" height="31" alt="">
regular expression
preg_match('/src=\"(.*)\"/', $row->find('a img',0), $matches); if($matches){ echo $matches[0]; }
prints src="http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif" width="89" height="31" alt=""
but I really want to print ... src="http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif"
or, if possible, just ... http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif
what should i add to regex? Thanks
mk_89 source share