import re


def extract_day_of_week(period_row, period_column, worksheet):
    """
    Extracts the day of week for a ridership data column be searching
    for 'weekday' or 'saturday' or 'sunday' strings under a period header.

    Args:
        period_row: Row for the period header. The day of week should be under it.
        period_column: Column for the period header.
        worksheet: The worksheet where the search occurs.

    Returns:
        A string with the day of week if one present; ``None`` otherwise.
    """
    day_of_week = None
    day_cell = worksheet.cell((period_row + 1), period_column)
    if day_cell.ctype == 1:
        day = day_cell.value.lower()
        regex_pattern = re.compile(r'(weekday|saturday|sunday)')
        result = regex_pattern.match(day)
        if result:
            return result.group(1)
    return day_of_week