import re


def get_sale_head(this_report):
    """Return the date of the livestock sale."""

    report_head = this_report.find('div', id = 'txt_117')
    report_head = report_head.p.get_text()
    report_head = report_head.split('-')
    for string in report_head:
        if re.search(r'hd|head',string,re.IGNORECASE):
            match = re.search(r'([0-9]+)',string)
            if match:
                return match.group(1)