General principles of compliance
A simple criterion for verifying compliance is Google search.
You must enter complete words, because There are no derived words (for example,
joh will not match
john.smith@gmail.com ). The same is true for the plural (for example, the
app will not correspond to
apps@example.com ).
The word order does not matter if they are not enclosed in quotes (for example,
“smith john” will not match
john.smith@gmail.com ). As a rule, characters are ignored (see below).
Words are broken apart from letters, numbers and underscores. The most common breakdown characters are
+. @ . This means that
foo will not match
foo_bar@example.com , but will correspond to
foo+bar@example.com . The
@ sign is not considered a word and may be skipped (for example,
“smith gmail” will correspond to
john.smith@gmail.com ).
You can use the
OR operator in addition to grouping
() for some difficult conditions.
')
Character behavior
When you enter characters in the filter window, they usually behave differently:
- Characters that act like xy : ~ # $% ^ * +; ", <>? And the accent mark. * For example, smith ~ john becomes smith john , which corresponds to john.smith@gmail.com .
- Characters that act like "xy" : - = \: './ . For example, john-smith becomes “john smith” , which corresponds to john.smith@gmail.com .
- Characters that are interpreted literally: & _ . For example, john_smith will match john_smith@gmail.com , but not john.smith@gmail.com .
- Special characters :! @ () [] {} | :
- ! : john! smith becomes john -smith , which corresponds to john.foo@gmail.com , but not john.smith@gmail.com ;
- @ :
- @ is deleted at the end of a word. For example, john @ becomes john , which corresponds to john.smith@gmail.com ;
- @ is deleted at the beginning of a word. For example, @ foo.com ** will become foo.com , which corresponds to john+foo.com@gmail.com ;
- @ used in the middle of a word, usually requires a complete address for a successful search. For example, john.smith@gmail will not match john.smith@gmail.com . In addition, the characters will be taken literally. For example, to search for john.smith@gmail.com you must use john.smith@gmail.com , john-smith@gmail.com and john~smith@gmail.com will not work;
- @ used in different places in the middle of a word, has strange behavior. For example, when we try to find john.smith@gmail.com , then with:
- john @ smith @ gmail @ com - not found;
- gmail @ com - not found;
- @ gmail @ com - not found ** ;
- smith @ gmail @ com - there is ;
- smith@gmail.com - not found;
- "John smith@gmail.com" - not found;
- "John.smith@gmail com" - not found;
- | acts as an OR operator.
- Brackets are used for grouping in operators OR and AND .
Other examples of behavior
The default account you use (for example,
john.smith@gmail.com ) will match all of your address options if you use a
dot , a
+ sign or a
googlemail.com domain in
it .
Here is a brief description of each method:
- Point use : You can enter as many points as you like in your email address. For example, if your address is john.smith@gmail.com , then mail sent to johnsmith@gmail.com will be sent to your address;
- Using the + sign : After the name of your account, you can use the " + " sign and any text. For example, mail sent to john.smith+foo@gmail.com will come to john.smith@gmail ;
- Use of the googlemail.com domain : Any mail sent to the address of your account type <your-gmail-account> @ googlemail.com will be sent to your address with the domain @ gmail.com ** . For example, mail sent to john.smith@googlemail.com will come to john.smith@gmail.com .
You can combine address submission methods, for example,
johnsmith+foo.bar@googlemail.com =
john.smith@gmail.com .
Interesting consequences
1.
It is impossible to compare all your google addresses that use a dot .
If you have a habit of using a
dot in your email address to prevent spam (for example,
j.ohn.smith@gmail.com ), then you cannot easily create a filter for all versions of your address with a dot, because in this case they are divided into separate words (
j ohn smith ).
When you have only one option with a dot, it is easy to create a filter (for example, for spam). However, if you start using different options with a dot (for example,
jo.hnsmi.th@gmail.com ), this will cause different words to appear in the address (for example,
jo hn smi th ), which will force you to create different conditions for each option.
2.
The + symbol is worse than the "" operator when comparing addresses with a "+" sign .
If you are trying to create a filter for an address that uses
+ , it is best to use the full address in the filter (for example,
john.smith+foo@gmail.com ).
If, for any reason, you do not use the full address, you should keep in mind that the
+ operator is actually worse than the
"" operator. For example, using
john + foo is worse than
john foo , since the first option would be
foo@john.com .
Keep in mind that the last option is not a panacea, because
foo@john.foo.com will be found. He simply guarantees the correct word order. For clarity, you could use
"john + foo" , but in reality this is the same as
"john foo" .
3.
You must use the negation to find all the addresses with "+", to which the mail was sent .
To filter out all addresses that use
+ (for example, to send them to spam), you should use a request of the form
john.smith@gmail.com - "john smith gmail com" . The first part of the query will find all the addresses in which there is a
+ sign. The second part will remove all addresses in which there are no words in the same order. For example,
john.smith+foo@gmail.com will not be found because it has the word
foo between other words.
Please note that there is one strange and unlikely case when this will not work:
john.smith+john.smith.gmail.com@gmail.com , because it has words in a strictly defined order.
Notes
* - there is a symbol
` , but unfortunately the author does not have it;
** - use without space, because habr formats to habra user.
A sourceRelated documentation