Replacements of positive lookbehinds only replace first match
sjamaan opened this issue · comments
Peter Bex commented
Reported on chicken-users:
irregex-replace/all
only replaces first match when negative lookbehinds are involved
example:
the following regexp should replace any letter a preceded by x, y, or z
problematic code
(irregex-replace/all "(?<=[xyz])a" "xa ya za" "-")
; or
(irregex-replace/all '(: (look-behind (or "x" "y" "z")) "a") "xa ya za" "-")
should return "x- y- z-"
BUT actually returns "x- ya za"
masukomi (a.k.a. Kay Rhodes) commented
That was me in chicken-users. Holler if there's anything else you need from me. I should probably note that as far as i can tell this works fine with look-aheads, just not look-behinds.
Alex Shinn commented
Fixed, thanks!