Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find, in GMail, a list of all my unread messages — which I can get via is:unread or label:unread or l:^u — which do not have the label "ZDNet."

In other words, my requirement is this:

I have 185 e-mails which are "unread" in my Inbox.
I have 174 "unread" e-mails which are labeled "ZDNet."
I need to find the 11 e-mails in my inbox that are not part of the group of 174.

How can I do this?

share|improve this question
up vote 21 down vote accepted
is:unread -label:ZDNet
share|improve this answer
neo: I do not have enough reputation points, but the instant I get them, I will upvote the answer. So, would the general syntax be as follows- <Has Expression> "-" <Negation Expression> or something of that sort? – Kanini Sep 7 '10 at 11:06
@Kanini: You can search for <expression>. If you want to search for two expressions you can do <expr1> <expr2>. You can exclude the results of one expressions with the minus sign directly before the expression. <expr1> -<expr2> will give you all results of <expr1> excluding the results of <expr2>. – neo Sep 7 '10 at 11:34
I just tried this out, and discovered that the -label operator does not work in all cases. It seems okay when applied to the inbox, but not general searches. – Pops Sep 26 '11 at 6:51
@LordTorgamus: That's odd, I've never noticed that. – neo Sep 26 '11 at 16:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.