import re


def get_valid_filename(s: str) -> str:
    """Returns a valid filename given an input. Removes any characters unable to be in a filename"""
    s = str(s).strip()
    return re.sub(r'(?u)[^-\w.\[\]()\' ]', '', s)