Skip to content
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

Excluded endpoints in ranged quantifiers do not work at all (/ .**{2^..^2} /) #5794

Closed
p6rt opened this issue Nov 17, 2016 · 5 comments
Closed
Labels
regex Regular expressions, pattern matching, user-defined grammars, tokens and rules

Comments

@p6rt
Copy link

p6rt commented Nov 17, 2016

Migrated from rt.perl.org#130127 (status was 'resolved')

Searchable as RT130127$

@p6rt
Copy link
Author

p6rt commented Nov 17, 2016

From @AlexDaniel

*Code​:*
say ‘abcefghij’ ~~ / .**{0..^2} /

*Result​:*
「ab」

I expected 「a」

*Code​:*
say ‘abcefghij’ ~~ / .**{2^..^2} /

*Result​:*
「ab」

I expected it not to match anything (as if it was 3..1).

@p6rt
Copy link
Author

p6rt commented Sep 26, 2017

From @zoffixznet

10​:30 Zoffix teatime​: I see another bug with it​:
10​:31 m​: say "xxxxx" ~~ /"x" ** { -5..-1 }/
10​:31 camelia rakudo-moar 8cf083​: OUTPUT​: «「xxxxx」␤»
10​:31 Zoffix It doesn't check whether -1 was its own doing or something that came from the Range

@p6rt
Copy link
Author

p6rt commented Oct 1, 2017

From @zoffixznet

On Thu, 17 Nov 2016 14​:32​:19 -0800, alex.jakimenko@​gmail.com wrote​:

*Code​:*
say ‘abcefghij’ ~~ / .**{0..^2} /

*Result​:*
「ab」

I expected 「a」

*Code​:*
say ‘abcefghij’ ~~ / .**{2^..^2} /

*Result​:*
「ab」

I expected it not to match anything (as if it was 3..1).

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@681d6be9742e7c0
Test​: Raku/roast@99c822abdeefbbaf0

@p6rt
Copy link
Author

p6rt commented Oct 1, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 1, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 1, 2017
@p6rt p6rt added the regex Regular expressions, pattern matching, user-defined grammars, tokens and rules label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regex Regular expressions, pattern matching, user-defined grammars, tokens and rules
Projects
None yet
Development

No branches or pull requests

1 participant