0
for (int i = 0; i < lockedThreads.Count; i++)
{
    string link = lockedThreads[i];
}

link contains:

<a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=111536&forum=scoops1"><b>

I need to get only:

http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=111536&forum=scoops1

Each time the link is a different one and each time i need to get the link.

So in the end for example string t

khellang
  • 17,550
  • 6
  • 64
  • 84
user3788761
  • 55
  • 1
  • 6
  • 5
    [HTML Agility pack](http://htmlagilitypack.codeplex.com/) – Sayse Jul 03 '14 at 10:25
  • As mentioned before by Syase. HtmlAgilityPack is a versatile tool that can help you with a lot of html parsing problems. – Artyom Kharlamov Jul 03 '14 at 10:40
  • Please keep in mind that regexp is fine for a quick and dirty approach and if you are absolutely sure the form of the tag you are reading will never change; however websites do change quite frequently or at least you must assume they do. That aside I would just like to mention that [HTML is no regular language](http://stackoverflow.com/a/590789/2186023) – DrCopyPaste Jul 03 '14 at 10:40

1 Answers1

-3

The easy way is

var arr=link.Split('"');
var neededPart=arr[1];

Or You can look here Get string between two strings in a string

Community
  • 1
  • 1
Oleh
  • 447
  • 1
  • 11
  • 30