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

Singletons ignored in regex character classes #3291

Closed
p6rt opened this issue Dec 11, 2013 · 5 comments
Closed

Singletons ignored in regex character classes #3291

p6rt opened this issue Dec 11, 2013 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 11, 2013

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

Searchable as RT120753$

@p6rt
Copy link
Author

p6rt commented Dec 11, 2013

From mark@kli.org

 

 
 
 
 
  When singletons are used alongside ranges in character classes in
  regexes, the singletons seem to be ignored​:

 

  "Z" ~~ /<[A..MZ]>/ returns Nil; it should match.  It does not
  matter if the range is first or second, and "Z"~~/<[A..M
  Z..Z]>/ does match.  I know this used to work in (rather old)
  versions of rakudo, but not in the latest git build (0bf3de5f2).

 

  ~mark

 

@p6rt
Copy link
Author

p6rt commented Dec 12, 2013

From @timo

my recent optimization to reduce single-range character classes to two integer comparisons instead of a search-through-a-long-string operation had a bug where it would disregard everything else if there was also exactly one range in the cclass.

I committed a fix to master and will at some point add a test for it to the qregex tests.

@p6rt
Copy link
Author

p6rt commented Dec 12, 2013

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

@p6rt
Copy link
Author

p6rt commented Jan 15, 2014

From @coke

On Tue Dec 10 17​:12​:55 2013, mark@​kli.org wrote​:

When singletons are used alongside ranges in character classes in
regexes, the
singletons seem to be ignored​:

"Z" ~~ /<[A..MZ]>/ returns Nil; it should match. It does not matter if
the
range is first or second, and "Z"~~/<[A..M Z..Z]>/ does match. I know
this used
to work in (rather old) versions of rakudo, but not in the latest git
build
(0bf3de5f2).

~mark

Works now - added passing test to S05-mass/rx.t

--
Will "Coke" Coleda

@p6rt p6rt closed this as completed Jan 15, 2014
@p6rt
Copy link
Author

p6rt commented Jan 15, 2014

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

@p6rt p6rt added the testneeded 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
Development

No branches or pull requests

1 participant