import re


def parse_discount(element):
    """Given an HTML element, parse and return the discount."""
    try:
        # Remove any non integer characters from the HTML element
        discount = re.sub("\D", "", element)
    except AttributeError:
        discount = "0"
    return discount