SyntaxFix
Write A Post
Hire A Developer
Questions
What you are looking for is a "diff algorithm". A quick google search led me to this solution. I did not test it, but maybe it will do what you need.