Nolen, Mike wrote:
> I need to return all data inside each set
> of <> in a string ...
my $aa = "Mike <mike\@mike.com>, Mark <mark\@mark.com>";
print "aa is [$aa]\n";
while( $aa =~ /<([^>]*)>/g ) {
print "Matched [$1]\n";
}
> I've included 2 examples, but they both return
> the last item only...
That's because you say "start at the beginning, then match as much as you
can before a < and then some stuff until a >". So the "^.*" munches
everything until the last < in the string. Furthermore, your use of s///
destroys $aa. You want to use capturing parentheses in a match, which you
can loop over with while.
Cheers,
Philip
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]