in reply to regex help

what rest? Like this??
my ( $num, $rest ) = $img_name =~ /^(\d{6})(.*\.jpg)$/i;
Boris