@staticmethod
	def fetch_between(content, start_flag, end_flag):
		start_len, end_len	= len(start_flag), len(end_flag)
		start_pos	= content.find(start_flag)
		logger.debug('start_pos: %d' % start_pos)
		if start_pos < 0:
			raise exception.ServerException('Start flag not found!')
		end_pos		= content.find(end_flag, start_pos + start_len)
		logger.debug('end_pos: %d' % end_pos)
		if end_pos < 0:
			raise exception.ServerException('End flag not found!')
		return content[start_pos + start_len : end_pos]
dataset/ETHPy150Open jackyyf/paste.py/src/providers/ubuntupaste.py/UbuntuPaste.fetch_between/original