backslash handling for re.sub