I understand that when I want to use the re module in Python and the split() method, I need to provide the pattern where I want to break the string (i.e. at white spaces, I would use a pattern like this pattern = re.compile('\\s+')
).
But for more complex cases, where I have a string with a pattern which looks like this:
'letters<space>letters<space>numbers<space>...repeat...'
how should I write the regex to split at every repetition? I tried to use the negate of the expression that matches the string exactly until the repetition, like is suggested here, but Python throws an error. Any suggestion?