in reply to Help interpreting this code

Replacing \1 with $1 is the right thing to do. In both cases.

Abigail