Support empty string as replacement

This change allows using an empty string (`''`) as a replacement.