<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def match_content_type(entry, content_type, regex=True):
 """ Matches the content type of a request using the mimeType metadata. :param entry: ``dict`` of a single entry from a HarPage :param content_type: ``str`` of regex to use for finding content type :param regex: ``bool`` indicating whether to use regex or exact match. """

        mimeType = entry['response']['content']['mimeType']

        if regex and re.search(content_type, mimeType, flags=re.IGNORECASE):
            return True

        elif content_type == mimeType:
            return True

        return False