Filter subject keywords setting for Smart Matching decoded

In Microsoft Dynamics CRM, tracked e-mails can be linked to the appropriate records using a Tracking Token or Smart Matching. Smart Matching matches e-mails to records based on similar recipients and subject lines. However, noise words such as FW: and RE: in the subject line are ignored.

The Filter subject keywords setting (on the E-mail tab in System Settings) controls the noise words that are ignored. In a new installation the value for Filter subject keywords is ^[s]*([w]+s?:[s]*)+

But what does this mean? Well, here is my understanding, knowing that the value is a regular expression is the key. Each portion of the value matches characters as shown in the following table.

ValuePortionMatches
^[s]*([w]+s?:[s]*)+^
Start of line
^[s]*([w]+s?:[s]*)+
[s]*
Zero or more spaces or tabs
^[s]*([w]+s?:[s]*)+
( … )+
match the part inside the parentheses one or more times
^[s]*([w]+s?:[s]*)+
[w]+
One or more ‘word’ characters (letters, digits, underscore)
^[s]*([w]+s?:[s]*)+
s?
zero or one space characters
^[s]*([w]+s?:[s]*)+
:
A literal colon
^[s]*([w]+s?:[s]*)+
[s]*
zero or more spaces or tabs

The result is that multiple words that end in colons at the start of the subject line are ignored. So the following (in the subject line) are ignored for smart matching:

RE:

RE :

FW: RE:

FW: FW :

But multiple words before a colon, such as Out of Office: are not ignored.

Leave a Comment

Your email address will not be published. Required fields are marked *