Why reinvent the wheel? That's one hell of a lot of work when there's diff which is specifically for this task, and has been used around the world reliably since almost forever, and it does a heck of a lot more than just highlighting.
In reply to Re: Comparing two text files and marking differences
by stevieb
in thread Comparing two text files and marking differences
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |