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
In reply to Re: problem with parsing
by GrandFather
in thread problem with parsing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |