I have a large, multi-line string with multiple entries following a similar format. I'd like to split it into a list of strings for each entry.
I tried the following:
myre = re.compile('Record\sTime.*-{5}', re.DOTALL)
return re.findall(myre, text)
In this case, entries start with 'Record Time', and end with '-----'. Instead of acting how I'd like, the code above returns one item, starting at beginning of the first entry, and ending at the end of the last one.
I could probably find a way to make this work by using regex to find the end of a segment, then repeat with a slice of the original text starting there, but that seems messy.