txt = "The rain in Spain '69'"
x = re.split(r'\W*', txt)
print(x)
['', 'T', 'h', 'e', '', 'r', 'a', 'i', 'n', '', 'i', 'n', '', 'S', 'p', 'a', 'i', 'n', '', '6', '9', '', '']
txt = "The rain in Spain '69'"
x = re.split(r'\W+', txt)
print(x)
['The', 'rain', 'in', 'Spain', '69', '']
The documentation (python.org):
Another repeating metacharacter is +, which matches one or more times. Pay careful attention to the difference between * and +; * matches zero or more times, so whatever’s being repeated may not be present at all, while + requires at least one occurrence. To use a similar example, ca+t will match 'cat' (1 'a'), 'caaat' (3 'a's), but won’t match 'ct'.
Please explain this difference.