Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Between Markers by tomo_a
def between_markers(text: str, begin: str, end: str) -> str:
try:
left = text.index(begin) + len(begin)
except:
left = 0
try:
right = text.index(end)
except:
right = len(text)
return text[left:right] if left < right else ''
April 18, 2019