def add_brackets_around_string(word: str):
    """Adds square brackets for single character strings and round the rest.
    """
    if len(word) == 1 or (len(word) == 2 and word.startswith('\\')):
        return word

    return '(?:' + word + ')'