René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Match up to following tag [Perl]

Difference between minimal matching and maximal matching.
use warnings;
use strict;

my $line = "<tr><td>abc</td><td>efg</td><td>hij</td></tr>";
my $res;

($res) = $line =~ m!<tr><td>(.*)</td>!;    print $res, "\n";
($res) = $line =~ m!<tr><td>(.*?)</td>!;   print $res, "\n";
This prints:
abc</td><td>efg</td><td>hij
abc