I am trying to parse out an html page that has table rows in it. I need to get all of the table cells within a table row.
Here's a sample of the html that I"m trying to parse:
<tr style="font-size:8pt;">
<TD style="font-size:8pt;">1545644656</TD>
<TD style="font-size:8pt;">Billy</TD>
<TD style="font-size:8pt;">Johnson</TD>
<TD style="font-size:8pt;">DEF</TD>
<TD style="font-size:8pt;"></TD>
<TD style="font-size:8pt;">1134 Main St</TD>
<TD style="font-size:8pt;"></TD>
<TD style="font-size:8pt;">AnyTown</TD>
<TD style="font-size:8pt;">PA</TD>
<TD style="font-size:8pt;">05405</TD>
</TR>
and here is the regex I"m using to get all of the stuff between the tr start and tr end
Regex exp = new Regex("<tr style=\"font-size:8pt;\">(.*?)</TR>", RegexOptions.IgnoreCase | RegexOptions.Multiline);
I'm then doing a foreach loop to loop over all of my matches (there will be multiple rows)
foreach (Match mtch in exp.Matches(browser.Html))
but it's not matching anything. I had this exact same code working on the site before they added new lines (\n) when it was all just one single long string...now it doesn't match anything with the multi-line approach they're using.
Any ideas here?