Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Between Markers by JingMeng
def between_markers(text: str, begin: str, end: str) -> str:
s = (text.index(begin) + len(begin)) if begin in text else 0
e = text.index(end) if end in text else len(text)
return text[s:e]
June 20, 2019