Sdt chapter7

Ooh, I like the \g{-1}, the most recent group I presume?
This doesn't work though as . matches any character. You could use [\S] or similar. I tried this script with an input line "a  b" and it matched.