Using regular expressions
Last updated
Last updated
Regular expressions are a powerful and versatile tool that can help you find and work with words or phrases smartly. They can be used to do things like checking if an email address is correct or finding specific words in a text. These codes use a mix of letters and symbols to create patterns that describe what you're looking for. In simple terms, they offer a flexible tool for text processing.
Adding .*@mycompany\.com to your Global Email Address Exclusions settings will restrict saving email addresses of the @mycompany.com domain when they are the sender and/or a recipient of the email.
To exclude a single email address like john.doe@mycompany.com you should use a regular expression like (?i)john\.doe@mycompany\.com
The key difference here is that some characters need to be escaped when used in a regular expression. One such example is the dot "." symbol, which - when not escaped - means any character.
As you can see from the example below, escaping these characters can make a crucial difference in your regular expressions and therefore in the way the text is processed.
When the dot symbol is not escaped, any character will be accepted in its place:
When the dot symbol is escaped, the text will only match when there is a "." in the text.
Flags like (?i) can also be used in regular expressions to make them case insensitive:
You can learn more about regular expressions here:
Created regular expressions can be tested on sites like: