my $str = '3456' ; $str =~ m#()(.*)()# ; print "1 - $1\n2 - $2\n3 - $3\n" ; [ doug 14:49 ~ ]% perl test.pl 1 - 2 - 3456 3 -