Hi folks,

i have a task to verify that word "Bug" is in the table in the 3rd row from
the buttom, i came up with regex , but it doesnt work.
can anyone please take a look?



#/usr/bin/perl -w
my $line =
"<table>\n<tr><td>A</td></tr>\n<tr><td>Bug</td></tr>\n<tr><td>C</td></tr>\n<tr><td>D</td></tr>\n</table>";
print "3 matches: $1\n" if ($line =~
/<table>(.+Bug[^(<tr>)]+<\/tr>)\s*(<tr>.+<\/tr>\s+){2}[^(<\/tr>)]*<\/table>/s);

help really appretiated.
thanx
~i

Reply via email to