Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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

1 Answer 1

up vote 19 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
1  
@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

 
discard

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.