I could really use some help. I have the following two lines.
<TD noWrap>Data: <B><SPAN class="TableBody clsBold">4</SPAN></B></TD>
<TD noWrap>Format: <B><SPAN class="TableBody clsBold">9</SPAN>/<SPAN class=TableBody> </SPAN></B></TD>
I need to grab the text between the tags (4 and 9 respectively)
I’m using the following regex statement:
(\s)*(<B>)*<(?<SPAN>\w*)(?:.*)>(?:.*)</\k<SPAN>>
This works great for the first line as in:
Data: (\s)*(<B>)*<(?<SPAN>\w*)(?:.*)>(?:.*)</\k<SPAN>>
But doesn’t work with
Format: (\s)*(<B>)*<(?<SPAN>\w*)(?:.*)>(?:.*)</\k<SPAN>>
because it grabs the SPAN after the section I need, so I don’t get the 9 in group 4.
How do I get what I need using the same Regex line with different prefix.
I would specify exactly what it is I’m looking for in the regex. That being said, something like this should suffice:
It only uses two capturing groups, so you should get as matches
("Data", "4"), and("Format", "9")