I need to parse a text dump of a spreadsheet. I have a regex that parses every row of data correctly, but is pretty long. This basically just matches a specific pattern 12 or 13 times.
The pattern I want to repeat
\s+(\w*\.*\w*);
This is a regex (abbreviated)
^\s+(\w*\.*\w*);\s+(\w*\.*\w*);\s+(\w*\.*\w*);\s+(\w*\.*\w*);\s+(\w*\.*\w*);\s+(\w*\.*\w*);
Is there a way to match a pattern with a given number of times without copying the paste like that? Each of these sections corresponds to data columns, all of which I need. By the way, I am using Python. Thanks!
source share