Outlook mail rules wildcard
In Outlook, you can use wildcards in mail rules to match specific patterns in email addresses, subject lines, and other fields. Here are some examples of how you can use wildcards in Outlook mail rules:
Wildcard characters:
*
(asterisk) matches any sequence of characters?
(question mark) matches any single character[abc]
(square brackets) matches any single character within the brackets[^abc]
(square brackets with a caret) matches any single character not within the brackets
Examples:
- To match any email address ending with
@example.com
, use the rule:@*example.com
- To match any email address containing
@example
in the local part, use the rule:*@example*
- To match any email address with a domain name containing
example
, use the rule:*@*.example
- To match any email address with a subject line containing the word
urgent
, use the rule:subject: *urgent*
- To match any email address with a sender name containing the word
John
, use the rule:from: *John*
- To match any email address with a recipient name containing the word
Smith
, use the rule:to: *Smith*
Tips:
- When using wildcards, make sure to enclose the pattern in quotes to prevent Outlook from interpreting the wildcard characters as literal characters.
- You can combine multiple wildcards and literal characters in a single rule.
- Wildcards can be used in combination with other rule conditions, such as sender, recipient, subject, and body.
- Be careful when using wildcards, as they can match unintended emails if not used carefully.
Example rule:
Here's an example of a mail rule that uses wildcards to move emails from a specific sender to a specific folder:
- Condition:
from: *@example.com*
- Action:
move to folder: "Important emails"
This rule will move any email from an email address ending with @example.com
to the "Important emails" folder.