How do I write in regex that preg_match_all starts with “http”(without quotes) and ends with (“) or (‘) or white space(tabs, space, line break)
I want to preg_match_all all the parts just starting with “http”
Wupload
http://www.wupload.com/file/CCCCCCC/NNIW-LiBRARY.part1.rar
http://www.wupload.com/file/VVVVVVVV/NNIW-LiBRARY.part2.rar
http://www.wupload.com/file/TTTTTTT/NNIW-LiBRARY.part3.rar
Fileserve
http://www.fileserve.com/file/WWWW/NNIW-LiBRARY.part1.rar
http://www.fileserve.com/file/TTTTT/NNIW-LiBRARY.part2.rar
http://www.fileserve.com/file/RRRRR/NNIW-LiBRARY.part3.rar
Uploaded.To
http://ul.to/AAAA/NNIW-LiBRARY.part1.rar
http://ul.to/BBBBB/NNIW-LiBRARY.part2.rar
http://ul.to/YYYYYY/NNIW-LiBRARY.part3.rar
Results must be like this
http://www.wupload.com/file/CCCCCCC/NNIW-LiBRARY.part1.rar
http://www.wupload.com/file/VVVVVVVV/NNIW-LiBRARY.part2.rar
http://www.wupload.com/file/TTTTTTT/NNIW-LiBRARY.part3.rar
http://www.fileserve.com/file/WWWW/NNIW-LiBRARY.part1.rar
http://www.fileserve.com/file/TTTTT/NNIW-LiBRARY.part2.rar
http://www.fileserve.com/file/RRRRR/NNIW-LiBRARY.part3.rar
http://ul.to/AAAA/NNIW-LiBRARY.part1.rar
http://ul.to/BBBBB/NNIW-LiBRARY.part2.rar
http://ul.to/YYYYYY/NNIW-LiBRARY.part3.rar
i suggest you use parse_url to fetch parts of urls!
Take a look at php.net
EDIT :
CHANGE :
oOk, i don’t know what’s your code!if you want to scrape html to find links i suggest this to you, it return href values of a tag to you :
Then use parse_url to check thoes