New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regex captures not reset in negative lookahead #14387
Comments
From @maukeCreated by @mauke$ perl -we 'use Data::Dumper; print Dumper "ab" =~ /(a)x|a/' I don't understand why these two have different output. I think the second Instead it seems like $1 gets its value from a branch that never succeeded. Perl Info
|
From @jkeenanOn Sat Jan 03 06:08:29 2015, mauke- wrote:
Could you explain why you believe that the inner parentheses in: (?!(a)x) ... should *capture* the 'a' rather than merely *grouping* it. I don't see any evidence in the 'perldoc perlre' discussion of negative-look-ahead to support that, and in examples I can construct there is no capturing, only grouping. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @maukeAm 03.01.2015 um 15:49 schrieb James E Keenan via RT:
This seems somewhat off-topic, but OK ... ? () should capture because that's what () does in a regex. Why would it Consider /(?!(["'])foo\1).../. This does something sensible, I think. If you're looking for an example, see this bug report. A successful -- |
From @cpansproutOn Sat Jan 03 06:08:29 2015, mauke- wrote:
Trying to break my JAPHs, are you? :-) $_ = "JJJuussttt aannotherrr PPerrlll hhhhaackkeerrrr,,\n"; I have a hideous workaround for this bug in JE. It would be nice to see it fixed. This may be related to #38133. -- Father Chrysostomos |
From @maukeAm 03.01.2015 um 16:07 schrieb Father Chrysostomos via RT:
print "JJJuussttt aannotherrr PPerrlll hhhhaackkeerrrr,,\n" =~ y)))csr; FTFY :-) -- |
see also #19615 |
Migrated from rt.perl.org#123537 (status was 'open')
Searchable as RT123537$
The text was updated successfully, but these errors were encountered: