The Little Guy Posted February 13, 2011 Share Posted February 13, 2011 I am using this to get links from a page: preg_match_all("/href=(\"|')(.+?)(\"|')/", $opt, $matches); $links = $matches[2]; Once in a while I get a link that may look like this: site.com/"><span What can I do to make my regexp better so it doesn't get the html? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 17, 2011 Author Share Posted February 17, 2011 anyone? Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted February 17, 2011 Share Posted February 17, 2011 strip_tags(); on the result? http://au2.php.net/manual/en/function.strip-tags.php Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 17, 2011 Author Share Posted February 17, 2011 I do that already. I also have noticed that I get results like this too: site.com" class=" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.