in reply to another regex Question
Why not try a split? I process many HTML files with this command. Split the file on every occurance of <TABLE and you won't have to worry about eating up too many tables.
This way, you can concentrate on only one table at time and won't have to worry about greedy regexps.@parsedfile = split(/\<TABLE/,$file);
foreach $line (@parsedfile) { if ($line =~ /cellpadding\=2/) { do whatever } }
John Coswell - http://www.coswell.com
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: another regex Question
by jjhorner (Hermit) on May 24, 2000 at 18:00 UTC | |
by johncoswell (Acolyte) on May 24, 2000 at 19:18 UTC |
In Section
Seekers of Perl Wisdom