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: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/