Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Between Markers by ndj_ys
def between_markers(text: str, begin: str, end: str) -> str:
try:
if text.index(begin) > text.index(end): return ""
return text.split(begin)[1].split(end)[0]
except:
if begin in text: return text.split(begin)[1]
if end in text: return text.split(end)[0]
if begin not in text and end not in text: return text
Aug. 14, 2018
Comments: