1

I have HTML with this code inside:

    <div id="div_space">
    <div id="div" class="SCREENONLY" itemprop="description">Baby you<br />
    abcdefghijklmnop123456789</div><div id="song" class="PRINTONLY">blabla</div>

And i want to parse abcdefghijklmnop123456789 from the html with Regex:

string str = "<div id=ֿ\"div_spaceֿ\">(.*?)</div>"
Regex regex = new Regex(str);
Match match = regex.Match(html);

And Match is always empty, any idea what could be the problem?

YosiFZ
  • 7,792
  • 21
  • 114
  • 221

1 Answers1

5

AS Slaks commented you can get help of library like Html Agile pack to do this task

var dives = from div in htmlDoc.DocumentNode.Descendants("div")
           where div.Id == "div_space" 
           select div; 
carla
  • 1,970
  • 1
  • 31
  • 44
Damith
  • 62,401
  • 13
  • 102
  • 153