Re: Multiple Captures under one group



* Tad McClellan schrieb:
> amyl@xxxxxxxxxxxx <amyl@xxxxxxxxxxxx> wrote:
>
>> My goal is to have a "group" called groupnames that captures "Sloan,
>> Jones, JBUILD1". I have worked the regular expression I have into
>> being able to grab "Sloan", but I can't seem to figure out how to
>> capture Jones and JBUILD1 as well.
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> $_ = '04/15/2005 00:01:37 G3C8F49 Results group [groups=7]: Sloan=SET '
> . 'Jones=OK JBUILD1=FAIL';
>
> my @groupnames = grep $_ ne 'groups', /(\w+)=/g;

Seems there is always a space in front of the names. We could simply
catch all strings between " " and "=".

my @groupnames = / (\w+)=/g;

regards,
fabian
.