I'm trying to parse lines of the form:
command arg1[ arg2, ... argn]
such as:
usemtl weasels
or
f 1/2/3 4/5/6 7/8/9
Here is my regex:
^(\\w+)(( \\S+)+)$
When I parse the line "usemtl weasels", I get the following capture groups:
Match 0: 'usemtl weasels'
Match 1: 'usemtl'
Match 2: ' weasels'
Why the space before the second match group? It doesn't show up in Rubular.