I often see people use words in square brackets as part of the question title, such as:

[iphone] can't display frobnicator after doohickey
how to round a number to two decimal places [c++]

Naturally, when the asker is prompted to enter tags for their question, they'll typically just use the same words. This is redundant, as Stack Overflow has tags for this very purpose (and they work better for searching and categorisation than bracketed words in the title).

Suggestion: On the "Ask Question" page, when the title is typed using words in square brackets like the above, automatically remove the words from the title and pre-populate the tag entry field.

  • 7
    How would you handle "C arrays - problem with a[c++]"?
    – nb69307
    Commented Jan 24, 2010 at 12:09
  • I'd agree with Greg's comment on Jeff's answer, only match existing tags and at the start or end of the question. However, as I type this I realise that even that wouldn't cope with @Neil's example - damn!
    – ChrisF Mod
    Commented Jan 24, 2010 at 14:05
  • 1
    +1 I agree, I often remove stuff like this from questions.
    – Nifle
    Commented Jan 24, 2010 at 16:02
  • Just please don't implement it on Meta. Commented Jan 24, 2010 at 18:32
  • I find it a good practice to include the language or platform in the question title. It makes it much easier to scan lists of questions, picking which questions you care about or not. I find tags from the tag field much harder to read, but they are great for searching, though. (btw. I upvoted this because I find it a interesting question, not because I agree with the suggestion :-)
    – Vegar
    Commented Feb 16, 2010 at 10:23
  • A very similar request was completed in Aug 2011.
    – Pops
    Commented Sep 13, 2011 at 15:22

4 Answers 4

select Id, Title from Posts
where DeletionDate is null
and dbo.RegexIsMatch(Title, '\[[\w\+\.\-]{3,}\]') = 1

1,188 questions of 438,994 match. Sample:

[WCF] What files I need to check-in after adding a web service reference?
[WPF] Custom binding class is not working correctly
GWT Javascript Exception in Hosted Mode: Result of expression 'doc.getBoxObjectFor'  [undefined] is not a function.
"[MySQL] Joins are evil" - Cal Henderson
[jQuery] Show LIs based on ID in sequence
[CSS] Layer doesn't stretch to height of containing image
Generating a 3d captcha [pic]
[iPhone] Delaying but not disabling iPhone auto-lock
[C++] Hide class' methods from Intellisense and/or certain "clients"?
Get first key in a [possibly] associative array?


Automatic removal of bracketed tags from question titles

We now remove [tags] at the beginning of the title, only.

  • 7
    Maybe it's possible to enhance this, and match only those, where captured value matches an existing (and relatively popular) tag (so that [possibly] will be excluded). Commented Jan 24, 2010 at 8:17
  • 5
    I happened to notice about three in a row today, which caused me to think of this. I have a feeling that other people edit the titles to remove the bracketed words, as I do occasionally. Also, for better matching I'd probably match only bracketed words at the start or end (to avoid [possibly] above). Commented Jan 24, 2010 at 8:53
  • Just out of curiosity, I tried this query on the Data Explorer but it doesn't seem to work. Should it? Commented Oct 7, 2011 at 22:30
  • @Chris The RegexIsMatch function isn't defined in the Data Explorer database, so no.
    – Tim Stone
    Commented Oct 8, 2011 at 0:27

Would be a good shortcut to entering tags, but I think it's better to allow for some creative free room for authors. Also the box for entering tags is quite smart, better chances for using the correct tag and not (accidentally) creating a new one.

BTW, most [retag-request] question titles would look strange:

  • OR on Meta instead of [accept-rate] OR [acceptance-rate] on Meta
  • to retag instead of [mathematics] to [math] retag

OK, chances are low that meta have the same tags as the other sites.


I like it when people put the language in the title, for example What is a vector (C++), and I do it too sometimes.

It tells me instantly what language/major area the question is about, and I don't have to dig through the tags.. Finding C++ in array beginner vector c++ homework is much more time consuming.

EDIT: oh, and I don't think it's redundant at all. In the title there would be the most important tag, not all of them. This empathizes said tag giving to the reader more information that would be given without it, so by definition it cannot be redundant.

EDIT2: it also has a huge SEO advantage. Most people google "Language-Name-Here Question-Text-Here". If the SO question has the language name in the title, it will have it in the HTML title of the page AND in its url.. And having all the terms in the search query in the URL and title immensely helps ranking high.

  • I totally agree. I usually start my question with [language], and can't see why this should bother others enough for them to take it away.
    – Vegar
    Commented Feb 16, 2010 at 10:15
  • +1, but this could be helped if the user's tag order would be kept Commented Aug 17, 2010 at 12:23

I rather suggest just popping up a warning or a notification encuraging to remove the tags from the title when the title includes one of the tags. There are variants without brackets like How do I do X in C, Python - How do I do X, How do I do X (Ruby 1.8).

  • 1
    Saying "How do I do X in C" is fine as a title. It's when you just tack it on the front or back with brackets is the issue.
    – Grace Note StaffMod
    Commented May 11, 2011 at 19:47
  • 1
    Isn't that as redundant as "[C] How do I do X" then having a "C" tag? There are also variants as I added in my answer. It's not clear to me why "How do I do X in C" is okay and "How do I do X [C]" is not.
    – sawa
    Commented May 11, 2011 at 20:21
  • Hm... I should've linked it earlier, but I suggest reviewing this answer, which compiles a couple answers and comments across the network on the subject. In summary, the difference is that a bracket notation is a bothersome categorical element, while including it organically both reads better and sounds better. The versions with the hyphen and the parens are as bad as the brackets, as they're not organically part of the title.
    – Grace Note StaffMod
    Commented May 11, 2011 at 20:24
  • @Grace The link is interesting. I got your point regarding in .... But you can still see some variants that do not organically fit that are not using brackets.
    – sawa
    Commented May 11, 2011 at 20:28
  • 1
    Aye, and those are bad. I meant brackets less to mean specifically square brackets, but anything in which they're not organically part of the sentence, which your hyphen and parens are illustrative of. Good point on those.
    – Grace Note StaffMod
    Commented May 11, 2011 at 20:32

You must log in to answer this question.

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