-
Notifications
You must be signed in to change notification settings - Fork 15
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
Empty matches on replace/all #24
Comments
0.9.7 fixed some corner cases involving empty matches, causing this regression. It's surprisingly tricky to get these all right - I'm half tempted to just throw errors on empty matches :( |
Please do not throw errors on empty matches! |
I'm just grumbling and kicking myself for fixing the symptoms of the empty matches previously instead of the root cause. |
What I did for loop detection was to stop when we were string=? to the previous iter. That has turned out to be super expensive though. |
Just use irregex-fold for iteration, it does the work for you. |
I do use irregex-fold in another place in the code. The case where I used string=? for loop detection was for recursive re-matching from the start of the string. I.e. |
With a + instead of a kleenstar it works.
The text was updated successfully, but these errors were encountered: