Online Help
Ignore Comments Options

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
List of comments
New
Remove
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.
- Single line comments