try this code snippet:
static string ReplaceURl(Match m)
{
string x = m.ToString();
x = "< a href=\"" + x + "\">" + x + "";
return x;
}
static string ReplaceEmail(Match m)
{
string x = m.ToString();
x = "Mailto:" + x;
return x;
}
private void ModifyString()
{
string input = "find more on http://www.authorcode.com or you can email to" +
" contactus@authorcode.com";
Regex regx = new Regex(@"\b((http|https|ftp|mailto)://)?(www.)+[\w-]+(/[\w- ./?%&=]*)?");
string result = regx.Replace(input, new MatchEvaluator(ReplaceURl));
regx = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
result = regx.Replace(result, new MatchEvaluator(ReplaceEmail));
}