I have a requirement where I need to get the link only from this HTML
"<span class=""name""><a href=Details.aspx?entityID=1&hash=20&searchFunctionID=53b&type=Advanced&nameSet=Entities&q=a&textSearchType=ExactPhrase&orgTypes=01%2c02%2c03%2c04%2c05%2c06%2c07%2c08%2c09%2c10%2c11%2c12%2c13%2c14%2c15%2c16%2c90%2c96%2c98%2c99> GOOGLE CORPORATION </a> </span> <br /> <span class=typeDescription> 09 - Analytics Company </span>"
The output I need is
Details.aspx?entityID=1&hash=20&searchFunctionID=53b&type=Advanced&nameSet=Entities&q=a&textSearchType=ExactPhrase&orgTypes=01%2c02%2c03%2c04%2c05%2c06%2c07%2c08%2c09%2c10%2c11%2c12%2c13%2c14%2c15%2c16%2c90%2c96%2c98%2c99
I used
string sPattern ="[<a href=](.*?(99))";
MatchCollection mcMatches = Regex.Matches(input,sPattern);
foreach (Match m in mcMatches)
{
Console.WriteLine(m.Value);
}
This is not giving me right output. Can anyone point me in the right direction.