I have an internal company's web page and I need to extract a link from that page what I tried is
using (var client = new System.Net.WebClient()) { string pattern = @"(<a.*?>.*?</a>)"; MatchCollection hreflist; string Url = client.DownloadString("https://collaborate.citi.net/docs/DOC-908807"); hreflist = Regex.Matches(Url, pattern); Console.WriteLine("Total number of links in Url: " + hreflist.Count + "\n\n");
But this code doesn't seems to work here.