Possible Duplicate:
RegEx match open tags except XHTML self-contained tags
I would like tu pull some data from an external website. The html string looks like this (without spaces/lines breaks between the img tags):
<img class="car-type231" src="/2f36b523259e9871bfade01983c9cc91.png" title="toyota"/>
<img class="car-type211" src="/0abc9b3ae3ba4bbcb6d3593fad6c1450.png" title="nissan"/>
<img class="car-type311" src="/4528e30bb510b4289121b4c70cb48ea3.png" title="bmw"/>
<img class="car-type332" src="/64575fee55553623896c7fd587a33ac3.png" title="mercedes"/>
<img class="car-type544" src="/a4f32dd95976d76704795c471c9a08b8.png" title="audi"/>
etc...
I want to pull every src path and create an array that would look like this:
$matches[0] = '/2f36b523259e9871bfade01983c9cc91.png';
$matches[1] = '/0abc9b3ae3ba4bbcb6d3593fad6c1450.png';
etc...
I tried using preg_match with this parameter: '#src="(.*?)"#'
but it doesn't worked because it's returning all the html.
Any help would be appreciated!