2

Currentlly I'm using this query to search for programming questions in one of the StackExchange sites:

Is there a way to exclude a tag in the query?.

I mean that for example in this query I want to perform a search of [C#] tag but I want to exclude questions that are tagged with [.net] tag:

I don't want to get questions that are tagged with both [C#] and [.net], only [C#].

Is possible?. If not, then please consider this as a feature request.

4

Put a - in front of the tags you wish to exclude.

In your case the whole search would be:

[c#] -[.net]

You can see this at the bottom of the "advanced search tips" on the search page, as well as the How do I search? help center article.

To exclude results from a tag, term or phrase, prefix it with - in your query: waffles -unicorns finds posts that mention tasty batter-based breakfasts without including mythical creatures, while [laurel] -[hardy] includes only posts pertaining to the first half of the classic comedy couple.

  • Thanks for answer, could you please explain how I combine the exclusion with the OR operators? this dont works: [.net] or [vb.net] -[wpf] -[asp.net] I still get wpf and asp.net questions. – ElektroStudios Nov 11 '15 at 16:48
  • [.net] or [vb.net] and -[wpf] and -[asp.net] seems to work. – Oded Nov 11 '15 at 16:52
  • Thanks but didn't worked, I get a regular search results instead of a 'Tagged Questions' search results. – ElektroStudios Nov 11 '15 at 16:54
  • That's the extent of the system at the moment. It does search via tags, however. Take a look at the side bar - it matches exactly this search. – Oded Nov 11 '15 at 16:58

You must log in to answer this question.

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