def suffixStrip(key, suffix):
  if not (key and suffix): return None

  beforeSuffixSearch = re.search("(.*)%s"%(suffix), key)
  if not beforeSuffixSearch: return None

  return beforeSuffixSearch.groups(1)[0]
dataset/ETHPy150Open odeke-em/restAssured/api/crudAPI.py/suffixStrip/original