Skip Menu |
Report information
Id: 130711
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: smls75 [at]

Severity: (no value)
Tag: regex
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Fri, 3 Feb 2017 18:28:10 +0100
To: rakudobug [...]
Subject: [REGEX] `**` quantifier with dynamic count, misbehaves under `:exhaustive` matching
From: "Sam S." <smls75 [...]>
Download (untitled) / with headers
text/plain 598b
Normally, the `**` quantifier doesn't care whether the count is specified as a literal or as an expression enclosed in `{ }`: say "abc".match(/\w ** 2/) # 「ab」 say "abc".match(/\w ** {2}/) # 「ab」 say "abc".match(/\w ** 2/, :ov) # (「ab」 「bc」) say "abc".match(/\w ** {2}/, :ov) # (「ab」 「bc」) But when the `:exhaustive` flag is active, it misbehaves when the count is specified as a `{ }` expression: say "abc".match(/\w ** 2/, :ex) # (「ab」 「bc」) say "abc".match(/\w ** {2}/, :ex) # (「ab」 「a」 「bc」 「b」)
Download (untitled) / with headers
text/plain 135b
This bug is still present in Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-19-g151a2563 implementing Perl 6.c.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at