regex needed
Posted: Fri Jan 01, 2010 7:08 pm
Hi All,
I need the regex that will get out the following links from a html page.
http://rapidshare.com/files/321406832/M ... res_pn.mp3
http://www.megaupload.com/?d=BCVJM9HS
the only bit thats not unique and thus matchable is really the domain name. the rest of it will obviously change on each post im looking at as this is getting links from a forum and then checking links for a personal project of mine.
They do vary alot on page to page a couple of obviouse things like not all users will put "www." and some will - same with http://. in this particular post there are only two domains, in others there are more but i have a list of domains i can add to the regex if its easy enough.
There will also a lot of the time be 10+ of the above links but i guess preg_match_all will resovle that!
Thanks very much!
Billy
I need the regex that will get out the following links from a html page.
http://rapidshare.com/files/321406832/M ... res_pn.mp3
http://www.megaupload.com/?d=BCVJM9HS
the only bit thats not unique and thus matchable is really the domain name. the rest of it will obviously change on each post im looking at as this is getting links from a forum and then checking links for a personal project of mine.
They do vary alot on page to page a couple of obviouse things like not all users will put "www." and some will - same with http://. in this particular post there are only two domains, in others there are more but i have a list of domains i can add to the regex if its easy enough.
There will also a lot of the time be 10+ of the above links but i guess preg_match_all will resovle that!
Thanks very much!
Billy