0

I have a number of HTML files and I want to extract a particular value from all those files.

<div class="ABC">Value</div>

I want to extract the Value from all the pages. Should I use regex or some HTML parsing libraries? I am not very much familiar with regex, and I couldn't find any documentation of HTML library - HTML Agility.

Which approach should I follow? If I should use Regex, Or library or is there a better way of doing it?

Tanuj Wadhwa
  • 2,025
  • 9
  • 35
  • 57
  • 3
    [Relevant - Parsing HTML With Regex](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) – tnw May 29 '13 at 13:03
  • @tnw Relevant to **this** question: the answer below that. – It'sNotALie. May 29 '13 at 13:09

1 Answers1

-1

The most recommended way is to parse it by Your own.

You will need to create a method, but in the future You will have it as Your own tool, evolving whith every problem.

Take a look :

How to get IMG tag's source from given HTML string using c#

Community
  • 1
  • 1
icbytes
  • 1,831
  • 1
  • 17
  • 27