def AssertMatch(string, pattern, msg=None):
  if not re.match(pattern, string):
    _RaiseWithInfo(msg, "%r doesn't match /%r/" % (string, pattern))
Raises an error when string doesn't match regexp pattern.
dataset/ETHPy150Open ganeti/ganeti/qa/qa_utils.py/AssertMatch