def TRegex(pobj):
  """Checks whether a string matches a specific regular expression.

  @param pobj: Compiled regular expression as returned by C{re.compile}

  """
  desc = WithDesc("String matching regex \"%s\"" +
                  pobj.pattern.encode("string_escape"))

  return desc(TAnd(TString, pobj.match))
dataset/ETHPy150Open ganeti/ganeti/lib/ht.py/TRegex/operator `%` -> `+`