allow escapes in regex replacement

I'm looking at you, @spake.