Hi
We are having an issue with the Replace method where it is not removing the entire matched text when it is replacing.
The attached solution should illustrate the issue clearly (Restore NuGet Packages to build).
We are using a regex to find any text that is between square brackets. The example doc has 9 of these, the first 6 have the characters ‘CLI’ that are in the middle of the text that are not removed, the last 3 work correctly.
In the Replacing callback, the args.Match.Value is missing the ‘CLI’ characters but if you look at args.MatchNode.ParentNode.GetText() then the whole string is still there, I’ve put a messagebox in the example solution that can be commented out to show this.
Before
image.png (10.7 KB)
After
image.png (4.8 KB)
Do you know what the issue might be?
Thanks!
ReplaceIssue.zip (235.0 KB)