ExamDiff Pro Advanced Tutorial #2

:: Tutorials :: ExamDiff Pro :: Home

How to ignore line numbers in text files

Tutorial Description: Sometimes you may need to compare files with line numbers. This tutorial will cover how to remove line numbers from comparison.

Video Demonstration

Example: You will be using a correctly formatted version of Jakob Nielsen's The Top Ten Mistakes of Web Design, as well as a version that has all the line numbers switched around. For your convenience, the lists have already been formatted for this tutorial: download top10mistakes_correct.txt into a new file named top10mistakes_correct.txt, and top10mistakes_wrong.txt into a new file named top10mistakes_wrong.txt.

Steps:

  1. Open ExamDiff Pro and compare top10mistakes_correct.txt to top10mistakes_wrong.txt.

    ExamDiff Pro Compare dialog, with our two files selected for comparison

  2. Uh-oh. Something is wrong here. The mixed-up line numbers are making ExamDiff Pro think that the files are completely different.

    ExamDiff Pro main window, showing the problem we obtain by comparing our two files

  3. Click View | Options.... (or press Ctrl + J) and go to the Compare sub-menu. Click on the Parts matching regular expressions radio button. In the text box near where it says Parts matching regular expressions, write "^\d+" (without the quotes).

    ExamDiff Pro Options dialog, Compare tab

  4. Click OK to leave the Options page and click Yes on the "Some comparison options have changed. Would you like to re-compare now?" dialog.

    Dialog prompting to recompare

  5. Another dialog appears, saying "Identical Files." Click on Show Anyway.

    Dialog showing that the files being compared are identical

  6. As you can see, the line numbers have been ignored.

    ExamDiff Pro main window. The two files are now identical, as they should be!

Conclusion: Regular expression support makes ExamDiff Pro a very powerful file comparison tool. To learn more about using regular expression in the application visit this Online Help page.