The problem is that you still only have two capturing groups because you only have two capturing parentheses in the expression. Just because your first group matches three things doesn't give you three groups. You get one group that ends up with the last thing that it matched.
Maybe make a second regular expression to match the different flags? Or they could be extracted by other means.
I tried to just place (-. ) into 3 parentheses instead of 1 but all it did was that it give me -c into 3 groups, also as mentioned above, when I use the "?:" flag in the code I posted below it won't compile the expression at all (iRes on line 13 isn't 0)
I would make two regular expressions. The first one to capture all the switches as one group and the second one to match them individually.
I am not that familiar with the regular expression engine you are using so I can't provide a proper code example. Is there any reason you are not using the standard library version <regex>? The posix library is quite difficult to work with.