I am trying to get a link from a preg match but it is not giving any output
Here is pattern:
<a href="http://media1.xyz.com/full5/Animals/Rabbits/rabbits-16a.jpg" download="rabbits-16a"><img onmouseover="showFullScreen('inline')" onmouseout="showFullScreen('none')" src="http://media1.xyz.com/full5/Animals/Rabbits/rabbits-16a.jpg" id="wall" border="0" align="middle" width="1920" height="1080" alt="Rabbits 1920x1080 Wallpaper # 17" title="Rabbits HD Wallpaper #17" /></a>
I have tried this:
preg_match("/\<a href=/\"(.*)\">/",$str,$title);
I want to get the link of href only.