タグからsrc値を抽出しようとしていますが、これまでのところ、src値と文字列の最後の引用符の間の文字列を抽出できるようです。
弦:
<img border="0" src="http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif" width="89" height="31" alt="">
例:PHPの場合:
preg_match('/src=\"(.*)\"/', $row->find('a img',0), $matches);
if($matches){
echo $matches[0];
}
プリントアウト
src="http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif" width="89" height="31" alt=""
しかし、私が本当に印刷したいのは...
src="http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif"
または可能であれば...
http://i.bookfinder.com/about/booksellers/logo_borderless/amazon_uk.gif
正規表現に何を追加する必要がありますか?ありがとう