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