if (Result.Contains("http://"))
{
string pattern = @"(http://)";
theend = Result.Substring(Result.IndexOf("http://"));
Regex rgx = new Regex(pattern);
string replacement = "<a href="+theend+">"+theend+"</a> ";
Result = rgx.Replace(Result, replacement);
}
The result is normal link (a href) and after that there is a string http://. How do I get only a link?
Not clear exactly what are you trying to do. how does the input
Resultlooks like.if
Resultonly contains the URL then just change:to
Update:
Anyway, You can use this function: