-2

Here is the part I'm trying to parse.

<tr valign="top">
    <td>Network</td>
    <td>Vodafone Uk Ltd</td>
</tr>

I'm trying to only get this part parsed

<td>Vodafone Uk Ltd</td>

I've tried stuff like this <td>(*?)</td> but I've had no luck so far.

Dzje
  • 65
  • 9

1 Answers1

0

If you're parsing HTML in C#, I would recommend using HTML Agility Pack

HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.Load("http://somepath.com"); //use this to load from url
htmlDoc.LoadHtml(html); //use this to load from string
HtmlNode docNode = htmlDoc.DocumentNode; //bring DocumentNode into Context
var allTDs = docNode.SelectNodes("//td");
pim
  • 12,019
  • 6
  • 66
  • 69
  • Okay thanks for the information but I've never used HTML Agility Pack before is there any questions already answered in relation to what I'm looking for but in HTML Agility Pack. I've tried looking but can't find much on this here. – Dzje May 11 '16 at 01:19