link'; $str = preg_replace("/(http:\/\/(.*)\/)[\S]*/", "\\1 ", $replace); return $str; } ?>

//$thisone="http://www.verylongurl.com/fuckoff.php?youaregayandsmell=true&itssotrue=ithurts+sucks "; //$that=preg_replace("/(http:\/\/(.*)\/)[\S]*/", "link ", $thisone); //print("->".$thisone."<-
->".$that."<-"); //http://au.php.net/manual/en/function.preg-replace.php ?>