in reply to problem with parsing

Here's one way. Note though that for any significant amount of HTML parsing you really really should use one of the HTML modules such as HTML::TreeBuilder or HTML::Parser.

use strict; use warnings; my $text= "<td class=sp></td><td>Hello</td><td class=sp></td><td>Bye</ +td><td class=sp>"; my @matches = $text=~ m|<td>((?:(?!</td>).)*)</td>|g; print "@matches";

Prints:

Hello Bye

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: problem with parsing
by Anonymous Monk on Apr 27, 2006 at 09:55 UTC
    thx o lot