I'm trying to make a regex to capture a string, but I don't know why the output puts the last character before the separator in another group
This is the regex I'm using:
(\w|\d|\s)*
This is the string I'm using for test:
Eleccion Nacional 2017
So in one group I get: Eleccion Nacional 2017
And in another I get: 7
Could anyone please explain to me why this is happening?

word (\w)or adigit (\d)or awhitespace (\s)\w+(?:\s+\w+)*to prevent matching leading and trailing spaces as \w also matches \d