"[EMAIL PROTECTED]" wrote:
> the memory variables $1 - $9 i think are odd.
Yeah, me too. you can use regular expressions
in list context to capture the matches though:
my @matches = $str=~/(patt)(patt2)(patt3)/;
the only caveat is that this will NOT update
the \G anchor or the value returned by pos($str).
I filed a perlbug on this, but claims that this
would break backward compatibility were given
as a reason to not change this 'feature'.
what I ended up doing was
doing the regular expression in array context,
and then creating a string in a for loop
push(@matches, $1);
where "$1" was the match variable I wanted,
and then doing an eval on the string.
If you don't need \G, then just use the regexp
in list context though.
Greg
- [Boston.pm] perl regex memory missing two dimentions [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Kenneth Graves
- Re: [Boston.pm] perl regex memory missing two dimen... Chris Devers
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... Kenneth Graves
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Jerrad Pierce
- Re: [Boston.pm] perl regex memory missing two dimen... Kenneth Graves
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
