http://qs321.pair.com?node_id=11127702


in reply to Comparing two text files and marking differences

Although your task sounds simple, it is impossible to implement perfectly. Given any example, you know exactly what you want. Specifying how to handle that case is not too hard, but real-world examples do not always fall neatly into classes. You have not even considered the problem of text being rearranged. What if it is rearranged and then edited? At what point do you consider a sentence a replacement rather than an edit?

I recommend that you 'audition' several of the modules that have been suggested. Choose the one that seems the best. Accept the fact that you will not always like its output.

Bill