import re


def extract_note_end(string: str, has_mark:bool = True):
    """
    Helper function to extract information about note of the protein from Uniprot using regular expression.

    Args:
        string (str): Uniprot annotation string.
        has_mark (bool, optional): Flag if end quotation marks are present. Default is 'False'.
    Returns:
        str: Extracted string of the uniprot note section.
    """
    if has_mark:
        regex = r"FT\s+(?P<note>.*)\""
    else:
        regex = r"FT\s+(?P<note>.*)"
    result = re.findall(regex, string)
    return result