I am building a small cms system for personal use. A part of it requires me to get the first image url in an article. How can I do this?
Sample article content in variable $article
<p>
<img src="/images/userContent/2013-07-12%2022_27_34.png">
The griefing problem has been curbed!
</p>
How can I get the url /images/userContent/2013-07-12%2022_27_34.png
Possibly regex? if yes, how? I am clueless with regex