https://bugzilla.wikimedia.org/show_bug.cgi?id=55046
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Replace.py calls replaceExcept() from textlib.py, but the confirmation of replacements offered by textlib.py takes place in replace.py. Therefore it would be very difficult.
But there is a way to do that with a very small programming. Please have a look at http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes%5C_and%5C_fu..., where the first example is your friend. With a minimal rewrite of it you may confirm each modification separately. I think this is much simpler than rewrite both replace.py and textlib.py.
Is that an appropriate solution for your peoblem?