Escaping dollar signs

This little bug took me quite some time to track down. But dollar signs are reserved characters in the replacement text.