XeroXer Posted May 8, 2006 Share Posted May 8, 2006 Hi there!This is what I want to be able to do.If I have a page. Let's say [a href=\"http://www.mywebpage.com/links.html\" target=\"_blank\"]http://www.mywebpage.com/links.html[/a].And I want to get all the links from that page listed for me in plain text.So if the page has these one:[code]<a href="http://www.otherpage.com/1.html">1</a><a href="http://www.otherpage.com/2.html">2</a><a href="http://www.otherpage.com/3.html">3</a><a href="http://www.otherpage.com/4.html">4</a><a href="http://www.otherpage.com/5.html">5</a>[/code]I want to get out this:[code]http://www.otherpage.com/1.htmlhttp://www.otherpage.com/2.htmlhttp://www.otherpage.com/3.htmlhttp://www.otherpage.com/4.htmlhttp://www.otherpage.com/5.html[/code]Anyone have any ideas? Quote Link to comment Share on other sites More sharing options...
zq29 Posted May 8, 2006 Share Posted May 8, 2006 You could use preg_match(). Check [a href=\"http://www.regularexpressions.info\" target=\"_blank\"]http://www.regularexpressions.info[/a] for help with regex. 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.