def escapestr(text, ampm):
    new_text = re.escape(text)
    new_text = new_text.replace(re.escape(ampm), ampm)
    new_text = new_text.replace('\%', '%')
    new_text = new_text.replace('\:', ':')
    new_text = new_text.replace('\?', '?')
    return new_text
Escape text to deal with possible locale values that have regex
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_strftime.py/escapestr