import re


def get_error_num(function):
    """
    Extract first number from function name and return string with it.
    Leading zeroes will be truncated.
    """
    match_obj = re.search(r"\d+", function.__name__)
    if match_obj is None:
        return "0"

    result = match_obj.group(0).lstrip("0")
    if result == "":
        result = "0"
    return result