I am using PCRE with C++ (Borland) and want to get all matches of a group.
^(\w+\s)(\w+\s)*(\w+)$
input 1: first second third results in 3 groups (first, second and third)
input 2:first second second third results in 3 groups (first, second and third) too, but I need 4 groups.
The second word is optinal and occurs 0 - n times.