-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Using 35c5266, I can see that registers within repetitions are not correctly returned:
(cl-ppcre:scan-to-strings "(?:\\s+(\\w+)=(\\w+))*" " a1=A13 a2=A2 ")
" a1=A13 a2=A2"
#("a2" "A2")I would have expected either an array with 4 strings, or an array with two arrays (or lists) in it.
SCAN, REGEX-REPLACE, REGEX-REPLACE-ALL are all messed up by that, too, of course.
BTW, how is REGEX-REPLACE-ALL supposed to be used with repetitions? When having a pattern ^A(B)*$, the replacement lambda only gets called once (and has to return the complete new string), so it doesn't really provide any advantage over using SCAN.
So, in order to be able to return new strings for each of the B matches (individually) I have to match the A first, and then call again with :START for the Bs; there's no easier way, right?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels