import re


def invalid_characters(s):
    """Returns true if s contains some invalid character."""

    return re.search(r'[^ -~\n\r\t]', s)
    # ^ means not one of the following:
    #     ' -~' means one char in [32..126]
    #     ' -~\n\t\r' means one char in [32..126] or \n or \t or \r