4

According to What symbols/characters are not allowed in tags?, the list of allowed tag characters are [a-z 0-9 + # - .]

Currently, it seems that tags ending in - don't work properly on Stack Exchange. So for example, if I had a question about C--, I wouldn't be able to ask it on Stack Overflow

Allowed

Not Allowed

Is this naming limitation by design? If tag names can include +, is there a reason they can't end with -?

*Thanks to Rene for their SE Data Explorer query searching tags ending in + or -


Edit: After experimenting with the SE Data Explorer, I've found that there are a few other hidden restrictions on tag names. (See What symbols/characters are not allowed in tags?)

  • The minus sign is (only) in use as a hyphen between two words. Also, workaround. – Glorfindel Jul 28 '17 at 16:01
  • @Glorfindel I find it amusing that + can only be used at the end of a tag, while - can only be used in the middle. – Stevoisiak Jul 28 '17 at 16:02
  • 1
    Nitpick: that's not a minus sign, it's a hyphen. They are different. – Cai Jul 28 '17 at 16:22
  • 3
    The question is whether such a restriction is necessary; otherwise, in the face of a legitimate use case, there is no good reason to have it. – Robert Cartaino Jul 28 '17 at 16:25
  • I wouldn't be surprised if allowing a - at the end of a tagname would break the tag engine, making Marc Gravell unhappy ... – rene Jul 28 '17 at 16:40
  • @Cai Typography and semantics are not aligned here; nobody would read C-- as "C-hyphen-hyphen"... – user315433 Jul 28 '17 at 17:39
  • @Alex sure, but we're not talking about semantics, we're talking about a technical limitation of allowed characters and a minus sign isn't allowed anywhere in a tag – Cai Jul 28 '17 at 17:46
  • Possible duplicate of What symbols/characters are not allowed in tags? – iBug at home Jul 29 '17 at 2:25
  • 1
    @iBug: Not really. That's a more general one, but this is exploring a quirk of the restrictions that isn't stated clearly there. – Nathan Tuggy Jul 29 '17 at 2:59
  • @Glorfindel Actually, what the keyboard has is a hyphen-minus, which is used for a hyphen or a minus. In fact, the numeric keypad has the same character already present in the keyboard. – kiamlaluno Jul 29 '17 at 9:30
  • Maybe it happens few times to use a tag like c--, but since C-- is the name of a programming language, I would at least expect Stack Overflow to allow users to use that tag. – kiamlaluno Jul 29 '17 at 9:33

You must log in to answer this question.

Browse other questions tagged .