use strict;
my $str = '<table id=\'options_table\'>
<tr><td colspan=3><font size="3" class="colors_productname">
<i><b>Color</b></i>
</font>
<br /><table cellpadding="0" cellspacing="0" border="0"><tr><td><img class="vCSS_img_line_group_features" src="/v/vspfiles/templates/192/images/Line_Group_Features.gif" /></td></tr></table>
</font></td></tr>
<tr>
<td align="right" vAlign="top">
<img src="/v/vspfiles/templates/192/images/clear1x1.gif" width="1" height="4" border="0"><br />
</td><td></td><td>
<SELECT name="SELECT___S15FTAN01___29" onChange="change_option(\'SELECT___S15FTAN01___29\',this.options[this.selectedIndex].value)">
<OPTION value="176" >Ivory/Grey</OPTION>
</SELECT>
</td></tr>
<tr>
<td align="right" vAlign="top">
<img src="/v/vspfiles/templates/192/images/clear1x1.gif" width="1" height="4" border="0"><br />
</td><td></td><td>
<SELECT name="SELECT___S15FTAN01___31" onChange="change_option(\'SELECT___S15FTAN01___31\',this.options[this.selectedIndex].value)">
<OPTION value="167" >0/3 months</OPTION>
<OPTION value="169" >3/6 months</OPTION>
<OPTION value="175" >6/9 months</OPTION>
</SELECT>
</td></tr>
</table>';
my $regex = qr/<table.*?>(.*)<\/table>/isp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html