added ability to use the last group matcher ($+) when computing the "to"