def currency_match(match):
    """Parses a number with a currency.

    Args:
        match (regex match): A match
    """
    if not match:
        return None
    try:
        value = int(match.group('euro')) * 100
        cent = match.group('cent')
        if cent is not None:
            if len(cent) == 1:
                value += int(cent) * 10
            elif len(cent) == 2:
                value += int(cent)
            else:
                assert False
        return value, match.group('currency')
    except ValueError as e:
        return None
