Beispiel #1
0
def unescapeWithRe(text):
    """
    Unescape things like \n or \f. Throws exception if unescaping fails
    """
    return _re.sub(u"", text, u"", 1)
Beispiel #2
0
def unescapeForIni(text):
    """
    Inverse of escapeForIni()
    """
    return _re.sub(ur"\\x([0-9a-f]{2})", _unescapeForIniHelper, text)