Specify event rules by message name

With the message name filter, you can specify which messages you want an event rule to recognize. Message name filters are regular expressions that determine which messages apply to an event rule or to an application.

A regular expression can include portions of a file name and file extensions of a message that you want the event rule to include or exclude.

Enter the appropriate portions of a file name or a file extension in the Message Name Include Filter to include the messages that you specify. For example, enter \.doc$ in the Message Name Include Filter to include all messages with the file extension .doc for an event rule.

The Message Name Include Filter applies only to the event rule for which it is specified. You can set the Message Name Include Filter when you create an event rule, and edit or remove the filter after the event rule is created.

Enter the appropriate portions of a file name or a file extension in the Message Name Exclude Filter to exclude the messages that you specify. For example, enter \.exe$ in the Message Name Exclude Filter to exclude all messages with the file extension .exe for an application.

The Message Name Exclude Filter applies to all messages on the application level.

You can set the Message Name Exclude Filter when you register the application with the command setEventNotifications in the command line. Enter the regular expression for the message you want to exclude with the excludeFilter parameter. You can change an existing Message Name Exclude Filter from the command line. If the Message Name Exclude Filter is specified for an application, it is displayed as read-only in the Event Rule window.

The same regular expression rules apply for the Message Name Include Filter and the Message Name Exclude Filter.

The following table provides some example scenarios for filtering messages with the message name filter by using regular expressions:
To enact the event rule for message names that match... Enter this regular expression in the Message Name Filter
A file extension of .doc \.doc$
A file extension of .doc or .txt (\.doc$|\.txt$)
All the file extensions except .exe (?<!\.exe)$
A name that begins with Finance, Audit, or Report ^(Finance|Audit|Report)
A name that contains Finance (anywhere) .*Finance.*
All messages that begin with Finance with any file extension except .exe ^Finance.*(?<!\.exe)$

The Test the filter field checks that the example file name that you enter matches the regular expression. The event rule recognizes all messages that match the regular expression that is specified in the message name filter.

If theMessage Name Include Filter and the Message Name Exclude Filter are not specified, all messages apply to the event rule.