I\'m having to parse a text dump of a spreadsheet. I have a regular expression that correctly parses each line of the data, but it\'s rather long. It\'s basically just mat
How about using:
[x.group() for x in re.finditer(r'(\s+(\w*\.*\w*);)*', text)]
Did you find the findall method yet? Or consider splitting at ;?
findall
;
map(lambda x: x.strip(), s.split(";"))
is probably what you really want.