Exclude Pattern
Exclude patterns can be used to ignore false positive matches when using regular expression post-processors. For example, you may want to use a regular expression to search for the word "Error" in compiler output. This will find compiler errors, but if you also have a source file named MyError.cpp, that filename will be incorrectly detected as an error. It may be possible to modify the original regular expression to avoid false positives, but generally speaking regular expressions do not provide a convenient way to exclude these false positives. It is much simpler to specify an exclusion pattern which will suppress a match if the exclusion pattern itself matches. Continuing the example, you could specify an exclusion expression ".Error.\.cpp" to exclude any .cpp files with "Error" in ther name.
 | Escaping
Note that as the dollar sign character ($) and backslash character (\) have special meanings both in Pulse files and in regular expressions, you must take care when writing expressions that include these characters. See Escaping in Regular Expressions for details. |
Attributes
| Attribute |
Description |
Required? |
Default |
| expression |
The expression to exclude, in the format used by the java.util.regex package (very similar to Perl regular expressions). |
Yes |
|
Child Elements
None.
Examples
An illustration of the example described above:
<regex.pp name="compiler.pp">
<pattern category="error" expression="Error">
<exclude expression=".*Error.*\\.cpp"/>
</pattern>
</regex.pp>