Ok, I am trying to convert some PHP over to ASP to try to learn both languages a little better. I have ran into some PHP code I just do not understand how to convert over to ASP Can someone please help me out with it... Here it is...
Code:
function MakeUrl($strUrl)
{
$strText = ' ' . $strUrl;
$strText = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "$1<a href=\"$2\" target=\"_blank\" rel=\"nofollow\">$2</a>", $strText);
$strText = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "$1<a href=\"http://$2\" target=\"_blank\" rel=\"nofollow\">$2</a>", $strText);
$strText = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "$1<a href=\"mailto:$2@$3\" rel=\"nofollow\">$2@$3</a>", $strText);
$strText = substr($strText, 1);
return($strText);
}