-
Notifications
You must be signed in to change notification settings - Fork 567
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
{n}+ possessive quantifier broken in 5.20 #14857
Comments
From rolf.langsdorf@googlemail.comCreated by perl.lanx@gmail.comWithin regexes "{n}+" is like in "(sub-expression){n}+" a so called And according to perlre the following equivalence applies: PAT{min,max}+ (?>PAT{min,max}) this is true for 5.14 but not anymore for 5.20 ------ Test in 5.20 DB<2> print "aaa" =~ /(?>(a+))a/ DB<3> print "aaa" =~ /(a+){1}+a/ ------- Test in 5.14 DB<1> print "aaa" =~ /(?>(a+))a/ DB<2> print "aaa" =~ /(a+){1}+a/ DB<3> print "aaa" =~ /(a+){1}a/ ------- Furthermore from 5.20 on a non-sensical warning is emitted, example: Useless use of greediness modifier '+' in regex; marked by <-- HERE in m/\A ((a| see http://www.perlmonks.org/?node_id=1138774 and surrounding thread cheers Perl Info
|
From @iabynOn Sun, Aug 16, 2015 at 05:15:46PM -0700, rolf langsdorf wrote:
It bisects to this: commit 4fa6dd1 PATCH: [Perl #42957] Suggesting warning for useless greediness operator -- |
The RT System itself - Status changed from 'new' to 'open' |
From @khwilliamsonThanks for reporting this. Now fixed in blead by commit |
@khwilliamson - Status changed from 'open' to 'pending release' |
@mauke - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#125825 (status was 'resolved')
Searchable as RT125825$
The text was updated successfully, but these errors were encountered: