Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Between Markers by kopytok
def between_markers(text: str, begin: str, end: str) -> str:
""" returns substring between two given markers """
i = text.index(begin) + len(begin) if begin in text else 0
j = text.index(end) if end in text else len(text)
return text[i:j]
Dec. 17, 2018