It is switching out the library for another library. However, this is, by no means, a simple thing to do. No two libraries have the exact same API and they will each have their own bugs/idiosyncrasies that will need to be worked around. Our current .Net implementation is used because, well, it’s built-in to .Net and doesn’t require anything new. We could also use Python (which Paratext uses for other things), but it also does not support what is wanted.
Theoretically, we could use a Regex-only library built for .Net that does this this type of replacement, but I haven’t been able to find one (probably because .Net has Regex functionality built-in).
Using Perl would also theoretically work, but there is no good library for .Net to interact with Perl scripts (that I could find in my quick search).
So, at least for now, there is no good way to change Paratext to work the way that’s wanted unless we added in our own parsing into the mix - which would be a lot of work for not much gain.
Unfortunately, I think what you’re left with is creating a regular expression that finds the errors and then having to fix them manually.