Possible Duplicate:
replace ereg_replace with preg_replace
I have got the following function within a code base that takes a String and makes links active. I have noticed that ereg_replace() is Depreciated. How would I change this to use preg_replace?
 function makeActiveLink($originalString){
        $newString = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $originalString);
        return $newString;
    }
 
     
     
    