33

I was wondering if it is posible to search post with multiple tags but skipping a specific one.

For example, I can search multiple tags in the way:

[java] or [junit] or [regex]

But if I want to exclude [android] tag, is it posible to do this like:

[java] or [junit] or [regex] not [android]
1
  • A wonderful question. It will be useful for most question hunters
    – jafarbtech
    Commented Sep 20, 2017 at 10:31

1 Answer 1

43

This option exists already:

enter image description here

In order to do this, your search would be:

[java] or [junit] or [regex] -[android]

The - in front of [android] is used to signify not, and the or is, obviously, used to signify or. The - must be right in front of the tag to exclude (no spaces allowed). Otherwise, the search fails.

That search brings you to this page with the proper results.

But, you still need to make sure that you do not put the not tag first.
It is actually also now possible to search with a not at the beginning, but it is slow.

This feature is discussed on the blog.

9
  • Excellent, thanks. Btw, is it posible to save search criterias? Commented Jun 24, 2014 at 20:58
  • No, I don't believe that it is if you mean saving it as some sort of default search. However, you could always bookmark the page or just save the link somewhere.
    – Anonymous
    Commented Jun 24, 2014 at 21:00
  • I tried what you want but still having trouble. I created this post mentioning it maybe you can give me your opinion. Commented Jun 24, 2014 at 23:49
  • 3
    You should add that the feature works only if there are no spaces between the - sign and the [not-wanted-tag]. Commented Jun 25, 2014 at 20:02
  • @ypercube Done.
    – Anonymous
    Commented Jun 25, 2014 at 20:09
  • @Fede For saving search criteria, what about just saving the URL somewhere? stackoverflow.com/questions/tagged/…. Bookmark it or create a desktop shortcut or even just save it in a text file.
    – jpmc26
    Commented Jun 25, 2014 at 20:37
  • 1
    @jpmc26 Yes, I'm doing that but I think it's better to have that feature saved on our StackOverflow profile since bookmarks can be lost. Btw, I created this post but seems that people don't like that Commented Jun 25, 2014 at 20:42
  • Can I use "and" to get questions tagged with both of the tags? For ex: [Java] and [Collections]. I tried it , it's not working. Commented Aug 12, 2014 at 6:51
  • I got it. What all I need is [Java] [Collections] to get all question tagged in [Java] and [Collection]. Commented Aug 12, 2014 at 6:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .