from typing import Union
import re


def get_brackets(title: str) -> Union[str, None]:
    """
    Return the substring of the first instance of bracketed text.
    """
    regex_brackets = re.search(r"\[(.*?)\]", title)
    if regex_brackets is None:
        return None
    else:
        return regex_brackets.group()