$str =~ $regex; my @matches = map substr( $str, $-[$_], $+[$_] - $-[$_] ), 0..$#-;