thank you for reponse!
unfortunately I have to use regex to solve this problem.
I was trying to simplify:
$file=~/<table>.+Bug.+<\/tr>\s*<tr>.+<\/tr>\s*<tr>.+?<\/tr>\s*<tr>.+?<\/tr>\s*<\/table>/;
still does not work!!!
On 10/12/06, Dr.Ruud <[EMAIL PROTECTED]> wrote:
I . B . schreef:
> 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
Get rid of the "-w" and insert
use warnings;
use strict;
> [...]
>
/<table>(.+Bug[^(<tr>)]+<\/tr>)\s*(<tr>.+<\/tr>\s+){2}[^(<\/tr>)]*<\/tab
le>/s);
You should not use a regex but a proper HTML parser.
Regarding your regex:
[^(<tr>)]+
doesn't mean what you think it does. With the [^...], you are building a
character class that may not contain one of the characters "()<>rt".
See `perldoc perlre`.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>