Rob Coops wrote:
$text = "2 minutes, and 8 seconds";
$text =~ /(\d{1,2}).*?(\d{1,2}).*/;
---------------------------------^^When you are extracting stuff, .* is _always_ redundant in the beginning or end of a regex.
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
