import re


def extract_class_name(id):
    """
    Extract a class name from an id.
    Return None if this can't be done
    """
    match = re.match("(.+)style_[0-9]+_", id)
    if match:
        return match.group(1)
    else:
        return None