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
study called during regex matching can cause wrong matches #11436
Comments
From @nwc10Created by @nwc10This is correct: ./perl -Ilib -le '$a = "ydydydyd"; $b = "xdx"; warn $_ foreach $a =~ /[^x]d(?{})[^x]d/g' As are these two: $ ./perl -Ilib -le '$a = "ydydydyd"; $b = "xdx"; study $a; warn $_ foreach $a =~ /[^x]d(?{})[^x]d/g' Calling study during the match doesn't cause problems if the match target was $ ./perl -Ilib -le '$a = "ydydydyd"; $b = "xdx"; warn $_ foreach $a =~ /[^x]d(?{study $b})[^x]d/g' however, if study is called during the match, whilst the target is the currently $ ./perl -Ilib -le '$a = "ydydydyd"; $b = "xdx"; study $a; warn $_ foreach $a =~ /[^x]d(?{study $b})[^x]d/g' [note, just 1 line of output] The problem is REXEC_SCREAM. In that, at the start of the match, a flag is set to say "the target is the I think that REXEC_SCREAM is superfluous. The correct state can (I believe) Nicholas Clark Perl Info
|
@nwc10 - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#92696 (status was 'resolved')
Searchable as RT92696$
The text was updated successfully, but these errors were encountered: