telekons / one-more-re-nightmare

A fast regular expression compiler in Common Lisp
https://applied-langua.ge/projects/one-more-re-nightmare/
BSD 2-Clause "Simplified" License
138 stars 9 forks source link

Make character ranges inclusive #19

Closed madnificent closed 2 years ago

madnificent commented 2 years ago

Character ranges currently seem to be exclusive, rather than inclusive of the last character.

> (all-string-matches "[a-b]" "a")
(#("a"))
> (ren:all-string-matches "[a-b]" "b")
nil

I don't think this is in line with POSIX and based on the examples I doubt it's intentional. Can the range be made inclusive instead?

madnificent commented 2 years ago

Closing. Can't reproduce with fresh lisp environment. Works as expected now :thinking: :+1:

no-defun-allowed commented 2 years ago

This is indeed a bug with the version of OMRN that made it to the April Quicklisp release, which has been fixed since then.

madnificent commented 2 years ago

Ah, that explains! The issues was gone after I cloned the repository in search for a fix. In doing so I pulled in the fix. Sanity restored. Thank you.