Advanced Search Syntax
Certain special characters can be used to execute complex logic when performing searches on your email metadata (the Subject, To/CC/BCC, and From fields).
It is also possible to Search message content(new window) if the feature is enabled.
Logical AND is implicit between any two search keywords (so searching for hello world means a match for hello AND world). The other search operators are:
Name | Operator | Example | Example Explanation |
---|---|---|---|
Logical OR | | | hello | world | Matches text containing hello or world |
Logical NOT | ! or – | hello !world | Matches text with hello but not world |
Grouping | () | (cat -dog) | (cat mouse) | Matches text with cat and without dog or cat with mouse |
Phrase | “” | “hello world” | Matches text with the keywords adjacent and ordered, such as hello world and hello world and universe but not hello brave new world. You may use * as a word placeholder — hello * * world would match hello brave new world |
Proximity | “”~N | “hello world”~10 | Matches text containing hello and world with less than 10 words between them |
Quorum | “”/N | “hello dear world”/2 | Matches text with at least 2 of the 3 words, such as hello dear and hello world. hello there would not match, but hello there world would |
Order | “<< | hello << world | Matches text with hello and world only if they appear in the specified order. hello world would match but world hello would not |
Start | ^ | ^hello | Matches text that begins with hello, such as hello world but not say hello |
End | $ | world$ | Matches text that ends with world, such as hello world, but not world peace |
Wildcards | * and ? | h?llo w*d | The ? operator matches any single character, while * matches zero or more characters. The example search would match hello world as well as hallo word |