Boolean Search Syntax

  • * Operators and functions must be CAPITALIZED (e.g. AND, OR, NOT, ALL, ATLEASTONE, NEITHER, NOTALL)
  • * Special characters are: ! = ( ) " : , < > ? * and white space
  • * To match a character with special meaning such as (*, ?, ") you need to use an escape sequence prefixed with a backslash \
  • * Keywords containing special characters or phrases containing two or more words should be enclosed in quotes: "How to search Outlook Data Files (.pst and .ost)", "Outlook 2021, 2019"

OPERATORS and FUNCTIONS

Note that operators and functions must be CAPITALIZED, otherwise they will be treated as a regular word. Query operators must also be preceded and followed by query keywords or query phrases.

AND operator

The AND operator may be used to find emails containing both specified keywords.

Example:

Outlook AND search  finds "Outlook boolean search", "how to search keywords in Outlook"

OR operator

The OR operator may be used to find emails containing either of two keywords.

Example:

wildcard OR "search tool" finds "Outlook search wildcard", "boolean search tool"

NOT operator

The NOT operator excludes any emails containing the keyword which follows it.

Example:

folder AND NOT Thunderbird finds "search all folders and emails in Outlook", but not "search folders in Thunderbird"

ALL function

The boolean function ALL(term1, term2, ..., termN) is equivalent to term1 AND term2 AND ... AND termN

Example:

ALL("boolean search", "excel-like filtering", "instant search")

ATLEASTONE function

The boolean function ATLEASTONE(term1, term2, ..., termN) is equivalent to term1 OR term2 OR ... OR termN

Example:

ATLEASTONE("boolean search in outlook", "outlook search syntax")

NEITHER function

The boolean function NEITHER(term1, term2, ..., termN) is equivalent to NOT term1 AND NOT term2 AND NOT ... AND NOT termN

Example:

NEITHER("windows search", "search keyword")

NOTALL function

The boolean function NOTALL(term1, term2, ..., termN) is equivalent to NOT term1 OR NOT term2 OR NOT ... OR NOT termN

Example:

NOTALL(Outlook, Thunderbird, Outlook Express, "Windows Mail")

Parentheses

Search queries can use parentheses to control the logic of the query and they may appear in any combination. Every left parenthesis must have a corresponding right parenthesis. Queries can have nested parentheses.

Example:

(search AND multiple AND (emails OR folders))

WILDCARDS

A wildcard characters in a query may be used to searching for multiple items with similar, but not identical data. It allows to search all spellings of the keyword.

* character

Matches any number of characters. You can use the asterisk (*) anywhere in a character string.

Example:

search* finds search, searching, searches, searched

? character

Matches a single alphabet in a specific position.

Example:

"Outlook 201?" finds "Outlook 2019", "Outlook 2016", "Outlook 2013", "Outlook 2010"

Updated on November 07, 2023

Facebook Email

See Also

PST Walker Viewer: Guide

This guide provides step-by-step instructions on how to use PST Walker Viewer. Learn how to navigate the interface, open and search for emails, extract attachments, and more.

Sort and group email files and messages

Sort, arrange and group your email files and messages in a way that's helpful to you. For example, group by the name of the sender or the recipient and sort by the date of the email message, its size, and other options.

Search multiple .pst and .ost files without Outlook

Learn how to search through multiple .pst and .ost files without using Outlook. With Boolean search, built-in search filters, and regular expressions, you can easily locate essential emails, contacts, and more within multiple Outlook data files.