<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_card(card, text, default=None):
 """Parse a card from an input string """

    match = re.search(card.lower() + r"\s*=\s*(\w+)", text.lower())
    return match.group(1) if match else default