I know that ereg_replace () needs to be updated to preg_replace() but I am not sure of how to rewrite the rest of the string. I am not familiar with PHP. Please let me know how to update this or of any resources I can use as a guide.
[php] function hyperlink(&$string){
// match protocol://address/path/
$string = ereg_replace("[a-zA-Z]+://([-][.]?[a-zA-Z0-9_/-?&%])", “<a target=“blank" href="\0">\0", $string);
// match www.something
$string = ereg_replace("(^| )(www([-]*[.]?[a-zA-Z0-9/-?&%]))", “\1<a target=”_blank" href=“http://\2”>\2", $string);
//matches email
$string = ereg_replace(’[-a-z0-9!#$%&’+/=?^`{|}~]+@([.]?[a-zA-Z0-9/-])*’,”<a href=“mailto:\0”>\0” ,$string);
return $string;
}[/php]