Regexp replacement needs one extra level of escaping

The fix in 108fd881646a8949c0a7519a54bf8216e195da94 was incomplete
because of this.