Online Help :: ExamDiff Pro :: Home

Ignore Comments Options

Ignore Comments Options dialog

This page allows you to choose whether or not to ignore programming language comments, and select and define the comments you wish to ignore. Note that we use the term "programming language comments" in a very broad sense; any single- or multi-line part of a text file can be considered a "comment" as long as it is defined by a regular expression.

Several programming language comments are pre-defined in ExamDiff Pro. These definitions can be modified, and new ones can be added. The defaults can always be restored by using Reset to Default button.

Dialog Box Options

Ignore Comments
Enables/disables the option to ignore comments. Alternatively, you can use the Ignore Comments toolbar button Ignore Comments toolbar button, which is not shown by default but can be added to the text file comparison and directory comparison toolbars.

List of comments
Contains a list of all comments, and corresponding file extensions. Use checkboxes to enable/disable individual comments.

New
Creates a new blank comment.

Remove
Deletes the selected comment.

Details
Lists details of the selected comment, and enables editing of details:
  • Name
    The name of the comment (typically the name of programming language that uses the comment).

  • Extensions
    File extensions that the comment applies to.

  • Regular expression
    The regular expression that defines the comment.

    • Single line comments
      Single line comments (such as // in C++), use the following regular expression: [comment symbol].*?\n . For example, the regular expression for C++ style comments is //.*?\n . Note the non-greedy ? operator.

    • Multi-line comments
      Multi-line comments (such as /* */ in C), use the following regular expression: [start comment symbol].*?[end comment symbol] . For example, the regular expression for C-style comments is /\*.*?\*/ . Again, note the non-greedy ? operator.

    • Combining comments
      Different kinds of comments can be combined using the | character. For example, the regular expression /\*.*?\*/|//.*?\n ignores both C and C++ style comments.

Contents|Index