In Gmail, I want to search (not filter) messages which have a certain label label-a AND do not have another label label-b.

For instance, given those messages:

  • M1 : label-a
  • M2 : label-a label-b
  • M3 : label-b label-c
  • M4 : label-a label-c

the search should match M1 and M4.

is:label-a -label:label-b nearly works, but it leaves a few messages unfiltered.