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
System loop for pattern match #16598
Comments
From ph10@hermes.cam.ac.ukCreated by ph10@hermes.cam.ac.ukWhile testing PCRE2 I was considering this crazy pattern sent by a user: /(?<=\K.)/g Philip Hazel, PCRE2 developer Perl Info
|
From @AbigailOn Mon, Jun 25, 2018 at 09:23:54AM -0700, Philip Hazel (via RT) wrote:
You didn't indicate in which context you were running the match -- Using 5.26.2 on MacOS, I get: $ perl -wE '"ab" =~ /(?<=\K.)/g and say "[$&]"' $ perl -wE 'say "[$&]" while "ab" =~ /(?<=\K.)/g' $ perl -wE '@a = "ab" =~ /(?<=\K.)/g; say "[$_]" for @a' And while the latter two seem to be stuck in a loop, I could easily I agree though that getting stuck in a loop isn't the most useful Abigail |
The RT System itself - Status changed from 'new' to 'open' |
From ph10@hermes.cam.ac.ukOn Mon, 25 Jun 2018, Abigail via RT wrote:
I have a shell script which includes a Perl script which mimics the https://vcs.pcre.org/pcre2/code/trunk/perltest.sh?revision=936&view=markup The input file contained just two lines /(?<=\K.)/g It's also possible my environment (though it's supposedly straighforward
Yes, it would be nice if it didn't do that! Regards, -- |
This has been solved by forbidding \K in a lookaround assertion |
Migrated from rt.perl.org#133302 (status was 'open')
Searchable as RT133302$
The text was updated successfully, but these errors were encountered: