Closed tonibony closed 1 month ago
Hi Tonibony,
Thanks for reporting the issue. I have already located the part in the code and will provide you with an update soon.
Take your time, I won't need a fix anytime soon.
Hi tonibony,
Thanks for catching that bug, even if you don't need the fix asap. Appreciate your help! Here’s the new BUILD 472. If you want, you can test the correction and let me know or simply close this issue.
I'll include this fix in the next Notepad++ release.
fix will be available in MultiReplace Release 3.1.2.18
This issue happens when searching with RE and replacing in "Use variables" mode. When a match is found, if one of the capture variables becomes nil, all subsequent capture variables also become nil, even if their corresponding subexpressions have matched.
Find what:
(this) *(is)? *(a match)
Replace with:set("CAP1 = <" .. (CAP1 or "?") .. ">, CAP2 = <" .. (CAP2 or "?") .. ">, CAP3 = <" .. (CAP3 or "?") .. ">")
Use Variables: YES Search Mode: Regular expressionSample text:
And here is the result: