Re: Multiple Captures under one group
- From: Fabian Pilkowski <pilkowsk@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 02:31:52 +0200
* 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
.
- References:
- Multiple Captures under one group
- From: amyl
- Re: Multiple Captures under one group
- From: Tad McClellan
- Multiple Captures under one group
- Prev by Date: Re: SOAP::Lite proxied
- Next by Date: Re: SOAP::Lite proxied
- Previous by thread: Re: Multiple Captures under one group
- Next by thread: Single questions about file processing in perl
- Index(es):