Forum Discussion

tgraham-legalops's avatar
tgraham-legalops
Brass Contributor
Sep 10, 2023

Examples of "subject matches patterns" regular expression when auto-applying sensitivity label

Hello,   I'm trying to auto-apply a sensitivity label to Exchange content (a specific user mailbox) where the rule is defined by a "subject matches patterns" condition. Microsoft requires a regular...
  • miller34mike's avatar
    Sep 13, 2023

    tgraham-legalops 

     

    I'm sorry it took so long for you to get a response here but I believe, after some testing, that this is the regex you'd want to use, which will establish the word boundary as you were already trying to do, but you still need to use the "?:" to set the non-capture sub-pattern.

     

    \b(?:Litigation Hold)\b

     

    If you go to regex101: build, test, and debug regex and choose .NET (C#) as the flavor and get a match, then it will match within Microsoft.

     

     

     

     

     

     

Resources