'Throw an exception if the regular expresson pattern is matched'

def assertMatch(self, pattern, string, msg=None):

    m = re.search(pattern, string)
    if ((not m) or (not m.group(0))):
        raise self.failureException, (msg or '{0!r}    does    not    match    {1!r}'.format(pattern, string))
