import re


def get_field(doc: str, name: str):
    """Parse ReST field from document

    :param str doc: string of whole document
    :param name: name of field excluding the surrounding `:`
    :return: value of field
    :rtype: str
    """
    match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE)
    if match:
        return match.group(1).strip()