import re


def get_sale_head(soup):
    """Return the head of the livestock sale."""

    head = None
    head_string = soup.find('h3')
    if head_string:
        head_string = head_string.get_text()
        head_match = re.match('([0-9,]+) ?head', head_string, re.IGNORECASE)
        if head_match:
            head = head_match.group(1).replace(',','')

    return head