Matching Rapidshare links with regex

visoot

New Member
I want to match a sequence of Rapidshare links on a webpage. The links look like:\[code\]http://rapidshare.com/files/326251387/file_name.rar\[/code\]I wrote this code:\[code\]if(preg_match_all('/http:\/\/\rapidshare\.com\/files\/.*?\/.*?/', $links[1], $links)){ echo 'Found links.';} else { die('Cannot find links :(');}\[/code\]And it retuns \[code\]Cannot find links :(\[/code\] every time. Please note that I want to return the entire match, so it will bring back every Rapidshare link found on the page in an array.\[code\]$links[1]\[/code\] does have a valid string, too.Any help will be appreciated, cheers.
 
Back
Top