def filter_stupid_characters(string):
    """filter_stupid_characters"""
    for char in ['$', '\\', ' ', '__', '___']:
        string = string.replace(char, '_')
    if string.startswith('_'):
        string = string[1:-1]
    return string
