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

The application I maintain sends error emails to me, which contain a build number and a description of the failure. I want to be able to search for specific messages from specific builds but GMail doesn't seem to handle this properly. I have tried:

NullPointerException 12B -12A

to find emails for NullPointerExceptions that occurred in build 12B, and exclude those that came from build 12A. This search returns all NullPointerExceptions that came from EITHER 12B or 12A. I tried various grouping operators and nothing seems to work.

If I just search for 12B -12A it correctly doesn't show any 12A emails, but as soon as I add "NullPointerException" it starts finding all the NullPointerException emails ever.

share|improve this question
Are all these terms in the body or subject of the message ? – phwd Jul 8 '10 at 14:49
The NullPointerException part is in both and the build numbers are only in the body. – Mr. Shiny and New 安宇 Jul 9 '10 at 13:01

Try (NullPointerException AND 12B) -12A

share|improve this answer
That doesn't work for me. – Mr. Shiny and New 安宇 Jul 9 '10 at 13:01

Import the set of email messages that you want to search in Mozilla Thunderbird. Install the ImportExportTools add-on and use it to export the messages locally to a searchable format. Now use whatever search tool you like, for instance grep, to search your local repository.

It's a bizarre and tedious solution, but hey it works. And there seems to be little else one can do.

share|improve this answer

You can do this by wrapping the - within literal quotes.

NullPointerException 12B "-" 12A


NullPointerException 12B "-12A"

share|improve this answer

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.