# New Ticket Created by  equinox 
# Please include the string:  [perl #120574]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=120574 >


HI Bug Solvers,



my $token="n\n"; while ($token ~~ 
m:c/(.*?\n)\s*(\S\N*)||(.*?\n)\s*$||(.+)/) { say $/[0].Bool }

This returns true.

This should return false because $/[2] should be true.

It looks like a regex bug.

If named groups are used, it works correctly.

: my $token="n\n"; while ($token ~~ 
m:c/$<a>=(.*?\n)\s*$<b>=(\S\N*)||$<c>=(.*?\n)\s*$||$<d>=(.+)/) { say 
$/<c>.Bool };
[20:33:18] [+camelia] rakudo-parrot 75c45f: OUTPUT«True␤»




Marton

Reply via email to