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


This command:
perl6 -e "say 'rule1 foo rule2 bar' ~~ /^ ( 'rule1' || 'rule2' )* %% (.+?)
$/"

Outputs this:
「rule1 foo rule2 bar」
 0 => 「rule1」
 1 => 「 」
 1 => 「 f」
 1 => 「 fo」
 1 => 「 foo」
 1 => 「 foo 」
 0 => 「rule2」
 1 => 「 」
 1 => 「 b」
 1 => 「 ba」
 1 => 「 bar」

I can't see any reason why these partial matches should appear in the match
object. I expected this:

「rule1 foo rule2 bar」
 0 => 「rule1」
 1 => 「 foo 」
 0 => 「rule2」
 1 => 「 bar」

Reply via email to