def extract_string(str, start, end):
  """ Returns the string between start and end. """
  s = str.find(start)
  if s < 0:
    return None
  slen = len(start)
  e = str.find(end, s + slen)
  if e < 0:
    return None
  return str[s + slen:e]