Having this text:
<div align="center"><img src="media/k2/local/594b89d436f4b.jpeg" border="0" alt="" /><br /><br /><img src="media/k2/local/594b89d59fe0b.jpeg" border="0" alt="" /><br /><br /><img src="media/k2/local/594b89d68659f.jpeg" border="0" alt="" /><br /><br /><img src="media/k2/local/594b89d7289b6.jpeg" border="0" alt="" /><br /><br /><img src="media/k2/local/594b89d7cc2db.jpeg" border="0" alt="" /><br /><br /><img src="media/k2/local/594b89d8e3c3d.jpeg" border="0" alt="" /><br /><br /><img src="media/k2/local/594b89d9c732d.jpeg" border="0" alt="" /></div>
<img src="media/k2/local/594b89d436f4b.jpeg" border="0" alt="" />
<img src="media/k2/local/2.jpeg" border="0" alt="" />
I use the following regex to exactract the image urls:
<img(.+)src=[\'"](.+?)[\'"](.*?)\>
The thing is that this works correctly when the images are separated by line breaks.
From the first line of the example above, it takes only the last url when I want to get all of them. The second and third line, I get the URL correctly.
Demo: https://regex101.com/r/uXWFnW/2
How can I modify my regex in order to get all the urls that are in the same line? (the url must fit on group #2)
Thanks in advance.