repeating a section of a regular expression?
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 ;
?
map(lambda x: x.strip(), s.split(";"))
is probably what you really want.
(\s+(\w*\.*\w*);){12}
The {n}
is a "repeat n times"
if you want "12 - 13" times,
(\s+(\w*\.*\w*);){12,13}
if you want "12+" times,
(\s+(\w*\.*\w*);){12,}