import re


def extract_price(string: str) -> float:
    """Extracts price from body of text.

    Notes:
        - With some work this could likely be turned into a generic function for all spiders to use.
        - Only works with "$"
        - If multiple prices are present only the first is extracted,
            eg concession $10, full $20 would just return 10.0

    Args:
        string (str): Text blob containing price

    Returns:
        float: Extracted price
    """
    price_match = re.search(r"(?:\$)\s*([\d,]+(?:\.\d{2})?)", string)
    price = 0
    if price_match:
        price = float(price_match.group().replace("$", ""))

    return price