I'm trying to parse an HTML page and get a specific data (with PHP). This is my regex :
$pattern = '/class=\"group\">.*[\n\r]*.*[\n\r]*.*[\n\r]*.*/';
preg_match_all($pattern, $subject, $matches);
And this is what I find (highlighted in yellow):
<NOBR>םושיר לטב<input type="checkbox" name="DEL104004"
onClick="UPG104004.selectedIndex=0"></NOBR></TD>
<TD class="group">22</TD>
<TD class="points">5.0</TD>
<TD>some text</TD>
<TD><A HREF="http://www.website.com/mk.php?MK=104004" class="mk">104004</A></TD>
</TR>
<TR ALIGN=RIGHT BGCOLOR=#FFCC33>
<TD COLSPAN=2><BR></TD>
<TD>5.0</TD>
But actually all I need is the data circled in red (22, 104004). Can I do it with a regex?
MORE INFO
I can assume that this particular structure won't change. The HTML is mostly a table with few rows, some of them contains the data I want to get (group number and MK number).