Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Is there a way to search for question which contains a specific tag (or set of tag), but no other tags.

For example if I wanted to have only pure [php] questions I would input in the search filed the following:


Or for question only concerning html and css I would input:


Is there already such a feature hidden in the SO Engine? If not, with the high number of question in SO, I feel like it would be a good feature.

share|improve this question
Can you give an example where this would be useful? There could be any number of secondary tags on a question, but that doesn't make it any less relevant to a tag search. Unless I'm missing something. – CodeNaked Sep 8 '11 at 14:32
You'd have to get people to tag "pure php" questions with only the php tag first. – Bill the Lizard Sep 8 '11 at 14:38
@CodeNaked: That is an idea which came to me when browsing the unanswered question to see if I can find something I could answer. But more often than not, the question are about the subject I know, plus a tool I am not familiar with, or a combination of languages which are individually familiar, however never encountered together. And browsing through the 300.000+ unanswered question can take a long time. – Eldros Sep 8 '11 at 14:39
@Bill I'm sure there are question which have only one tag, there must be. – Eldros Sep 8 '11 at 14:40
There's not too many unanswered, open questions only tagged with php. There are quite a few single tag, open questions, though. – Tim Stone Sep 8 '11 at 15:04
A single tag can sometimes be an indicator of low quality, so that kind of search might be useful for pruning purposes. – Matthew Read Sep 8 '11 at 15:45
@Tim: php was just an example to illustrate my idea. – Eldros Sep 9 '11 at 6:52
Your use of "!" would be confusing to some of us, as it often means "not" as in I might read your "![php]" as "all tagged items that are not tagged with "[php]." – John Tobler Sep 9 '11 at 20:02
@John: I admit that it might be confusing, any suggestion as what other symbol could be used in this case? – Eldros Sep 14 '11 at 8:20
@Tim Stone: I made a few change to your query, to search for the Number of unanswered post with single tag. This and Brock Adams helped me find a few answers where I could at least try to help. – Eldros Sep 14 '11 at 8:42
I would like to hear the opinion of the person who downvoted this question. – Eldros Sep 19 '11 at 8:08
up vote 3 down vote accepted

I do not find any single symbolic way in common use to specify a search only for one particular tag and excluding all others. As mentioned in my earlier comment, I do not approve your recommendation of '!' because it too closely resembles the negation operator used in many modern computer programming languages.

My best guess at a reasonable design is to use the asterisk, '*' to emphasize "only."

Example: type '*[php]' to specify "give me only items tagged with 'php' and nothing else."

This would avoid implying something like the "not" operator in common use.

I would also recommend providing '+' to make a tag required and '-' to prohibit one, including the ability to use multiple plusses and multiple minuses.

Example: '+[php] +[css] -[PDF]' to specify "give me items tagged with '[php]' and '[css]' but not with '[PDF]'.

That syntax is used at Delicious and in Google searches, so it is reasonably intuitive.

share|improve this answer

See my answer to "Search for undertagged questions".

You can do this with the Data Explorer if you don't mind data that lags by a month.

Here's a search for questions with only the php tag.

Likewise for only html+css.

share|improve this answer
I've found a way to look for questions without the one month tag. – Andrew Grimm Nov 21 '11 at 2:24

I've just noticed that if you do

[php] closed:0

and you sort by relevance, it looks like the first 5000 hits are only tagged with and nothing else.

If you're doing the query to tag under-tagged questions, this has the advantage over Brock's answer of not having the one-month lag.

share|improve this answer

If you're wanting to search only for questions about php, but not about frameworks, then do something like

[php] -[zend-framework] -[codeigniter]

That way, you could search for questions that are about pure php, but also happen to mention, say, .

share|improve this answer

You must log in to answer this question.

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