http://qs1969.pair.com?node_id=14548


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.

@parsedfile = split(/\<TABLE/,$file);
This way, you can concentrate on only one table at time and won't have to worry about greedy regexps.

foreach $line (@parsedfile) { if ($line =~ /cellpadding\=2/) { do whatever } }

John Coswell - http://www.coswell.com