I'm having trouble getting a regex to find the correct groups, even though the string does match. Examples of strings and desired groups:
12A TEST # Groups: [12, A, TEST]
12 A TEST # Groups: [12, A, TEST]
9 B # Groups: [9, B]
8 TEST A B # Groups: [8, TEST, A, B]
Basically a number, followed by an optional space, followed by any amount of words (separated by spaces).
The closest I've come up with is this, which matches the string, but only results in 2 groups for the first example: [12, A TEST]
/(\d+)\s*([\w+\s*]+)/g
Note: I'm using regexpal.com to test my regex. It's set to use the JS engine, but the actual regex will run in Python, if that matters at all.