Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
6-liner: regex solution in Creative category for Between Markers by przemyslaw.daniel
def between_markers(txt, begin, end):
import re
txt = begin*(begin not in txt) + txt + end*(end not in txt)
pattern = (begin+'(.*)'+end).replace('[', '\[').replace(']', '\]')
result = re.search(pattern, txt)
return result.group(1) if result else ''
Sept. 15, 2018
Comments: