I'm having issues extracting links in regex using preg_match_all()
.
I have the following string:
some random text <a href="http://localhost/example/wp-content/uploads/2014/07/Link1.pdf\">Link1</a><a href="http://localhost/example/wp-content/uploads/2014/07/Link2.pdf\">Link2</a>
I would like to extract the link to the files and the files format into two separate variables.
Any regex gurus here? I've been struggling with this all day.
Thanks!