Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Multiple Captures under one group
June 29, 2005, 11:40 am
rate this thread
Re: Multiple Captures under one group
m//g in list context should do the trick nicely.
Is that really the text you are working with, or did your "helpful"
news posting host word-wrap it for you, thereby breaking it?
The devil is in the details with pattern matching, we absolutely *must*
have the correct string to match.
Such problems can be avoided if you speak Perl rather than English,
as I've done in the code below.
Have you seen the Posting Guidelines that are posted here frequently?
$_ = '04/15/2005 00:01:37 G3C8F49 Results group [groups=7]: Sloan=SET '
. 'Jones=OK JBUILD1=FAIL';
my @groupnames = grep $_ ne 'groups', /(\w+)=/g;
print "'$_'\n" for @groupnames;
Tad McClellan SGML consulting
email@example.com Perl programming
Fort Worth, Texas
- » FAQ 2.5 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking...
- — Previous thread in » PERL Discussions