import re


def getAttributeData(tag, attribute):
    """
    Given a tag and an attribute, returns the value of that attribute
    within the tag, or None if that attribute is not found in the tag.
    """
    regExpression = re.compile('[ \n]+' + attribute + ' *= *"(.*)"')

    matchOb = regExpression.search(tag[1])
    if matchOb is not None:
        data = matchOb.group(1)
    else:
        data = None
    return data