First, here's the link of the different Transport Rule Conditions:
http://technet.microsoft.com/en-us/library/jj919235%28v=exchg.150%29.aspx
If you scan the Description column for "that match the specified regular expression" you will see that many different Transport conditions can use these.
I did some searching, and found this older Exchange 2010 document that details the RegEx support here:
http://msdn.microsoft.com/en-us/office/aa997187%28v=exchg.149%29
(And just in case, I will copy paste it at the bottom of this post as well)
So my customer's rule was very simple:
Choosing a subject matching ^## would select any subject that begun with ##
If you are interested in configuring Message Encryption, it requires Azure RMS licensing, and then following these two articles:
- Set up Microsoft Azure Rights Management for Office 365 Message Encryption
- Define rules to encrypt or decrypt email messages
Another really good example of a usage for regex is to match on something like a SS# pattern and block transmitting external to the organization using something like:
If subject or body matches \d\d\d-\d\d-\d\d\d\d
Pattern matching in Exchange Transport Rules
Pattern string | Description |
---|---|
\S | The \S pattern string matches any single character that's not a space. |
\s | The \s pattern string matches any single white-space character. |
\D | The \D pattern string matches any non-numeric digit. |
\d | The \d pattern string matches any single numeric digit. |
\w | The \w pattern string matches any single Unicode character categorized as a letter or decimal digit. |
\W | The \W pattern string matches any single Unicode character not categorized as a letter or a decimal digit. |
| | The pipe ( | ) character performs an OR function. |
* | The asterisk ( * ) character matches zero or more instances of the previous character. For example, ab*c matches the following strings: ac , abc , abbbbc . |
( ) | Parentheses act as grouping delimiters. For example, a(bc)* matches the following strings: a , abc , abcbc , abcbcbc , and so on. |
\ | A
backslash is used as an escaping character before a special character.
Special characters are characters used in pattern strings:
(525) , you would type \(525\) . |
^ | The caret ( ^ ) character indicates that the pattern string that follows the caret must exist at the start of the text string being matched. For example, ^fred@contoso matches [email protected] and [email protected] but not [email protected] . |
$ | The dollar sign ( $ ) character indicates that the preceding pattern string must exist at the end of the text string being matched. For example, contoso.com$ matches [email protected] and [email protected] , but doesn't match [email protected] |
No comments:
Post a Comment