Regular Expression to convert URL to Hyperlink


using System.Text.RegularExpressions;
//this will turn all urls in the input parameter string sInput into
HTML hyperlinks

public string ConvertURLsToHyperlinks(string sInput)
{
return Regex.Replace(sInput, @"(\bhttp://[^ ]+\b)", @"$0");
}