Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Between Markers by eryk.kosmala
def between_markers(text: str, begin: str, end: str) -> str:
a = text.find(begin)
b = text.find(end)
a1 = len(begin)
if (a>=0 and b>=0) and a < b :
odp = text[a+a1:b]
elif a < 0 and b > 0 :
odp = text[:b]
elif a > 0 and b < 0 :
odp = text[a+a1:]
elif a < 0 and b < 0 :
odp = text
else :
odp = ""
return odp
Nov. 15, 2018