Re: [CMake] Capturing matches in regex groups

2011-11-28 Thread Michael Hertling
On 11/28/2011 11:35 PM, Robert Dailey wrote: > I haven't really seen a way to get a list of group matches in a regex. For > example, string( REGEX MATCH ) only returns the whole string matched, not > just what was in the capture groups. If I do this: > > (\\w+)\\,(\\w+)\\,(\\w+) > > and I match t

[CMake] Capturing matches in regex groups

2011-11-28 Thread Robert Dailey
I haven't really seen a way to get a list of group matches in a regex. For example, string( REGEX MATCH ) only returns the whole string matched, not just what was in the capture groups. If I do this: (\\w+)\\,(\\w+)\\,(\\w+) and I match that regex against this string: hello,world,today I should