Okay, since you asked for it, here it is:
(?:(\w+) +|(?!^)\G) *(\S+ +[^\n, ]+) *,?
I changed all the \s
into whitespaces and the last \S
to [^\n, ]
so that the comma after the value is not consumed during the matching.
I made some more minor changes regarding the capture groups and the way you were negating the ^
for the \G
anchor.
It's working on PCRE flavoured regex like on this demo site but like I said, I'm not entirely sure \G
works on Ruby. Would be glad if someone could confirm this.