Try this:
$pattern=\"#http://(.?)\\"#g\";
where # delimiter
http:// part of search pattern
(.?) matches any char, any number of time, ? reverser greedines
\\" escapes the \", so for the search pattern it\'s only a \"
delimiter again
hope it works,... i did\'nt test it!