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

ignoremark + ignorecase ignores everything but first letter #5549

Closed
p6rt opened this issue Aug 9, 2016 · 5 comments
Closed

ignoremark + ignorecase ignores everything but first letter #5549

p6rt opened this issue Aug 9, 2016 · 5 comments
Labels
Bug

Comments

@p6rt
Copy link

@p6rt p6rt commented Aug 9, 2016

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

Searchable as RT128875$

@p6rt
Copy link
Author

@p6rt p6rt commented Aug 9, 2016

From @zoffixznet

If :i and :m are used on the regex, it appears to match the first letter. The returned Match will contains the given string of length that matches the regex​:

m​: say "All hell is breaking loose" ~~ m​:i​:m/"All is fine, I am sure of it"/
rakudo-moar fb4252​: OUTPUT«「All hell is breaking loose」␤»

m​: say "Production Ready" ~~ m​:i​:m/"Pfft, Not Yet"/
rakudo-moar fb4252​: OUTPUT«「Production Re」␤»

@p6rt
Copy link
Author

@p6rt p6rt commented Aug 9, 2016

From @timo

to be more precise, the way we code-gen "literal" qregex nodes with
subtype "ignoremark+ignorecase" will only ever check the ordbaseat of
the first character in the literal against the haystack.

@p6rt
Copy link
Author

@p6rt p6rt commented Aug 9, 2016

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

@p6rt
Copy link
Author

@p6rt p6rt commented Jun 8, 2017

From @samcv

On Mon, 08 Aug 2016 17​:34​:57 -0700, timo wrote​:

to be more precise, the way we code-gen "literal" qregex nodes with
subtype "ignoremark+ignorecase" will only ever check the ordbaseat of
the first character in the literal against the haystack.

This has been fixed as of Raku/nqp@18e4093 on nqp, and the regex nodes cleaned up.

With the new nqp​::indexicim and eqaticim ops in MoarVM we should have greater maintainability of that code and less difference between the different types of regex, mostly using the same code now.

The rakudo version where I bumped nqp is 2017.05-381-g1ac7996a4

Tests​: I have added tests to roast here, Raku/roast@0a80d0d

@p6rt
Copy link
Author

@p6rt p6rt commented Jun 8, 2017

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

@p6rt p6rt closed this Jun 8, 2017
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.