import re


def get_title(file_path: str) -> str:
    """
    Get the title of the file based on its position in the file.
    If there is a title, it will be the first line followed by two blank lines.
    """
    with open(file_path, "r", encoding="utf-8") as f:
        # regEx matches everything except line terminators from the beginning
        # and 3 line-feed characters (2 new lines)
        title = re.compile(r"^.+(\n\n\n)").search(f.read())
        if title is not None:
            return title.group(0).strip()
    return ""