6

A lot of the regex questions on SO are just tagged regex, and nothing else.

Just a few examples:
Regex: how do I capture the file extension?
using regex to trim off last few digits
extracting first letter of a String with Regex

Since there is such a huge variety of regex implementations, with significant differences between them, these generally end up with responses asking "what language!?" or similar.
(and especially so since many of them might be better with non-regex solutions)

It would be useful if there was a way to prompt users that enter a question with just a single regex tag (and no other tags to indicate language/tool).

i.e. in pseudo:

If (Tags.Count = 1) AND (Tags.ToString() = 'regex')
    Prompt("Please specify the language/editor/application this regex is for.")

If there are any situations where a regex question isn't specific, and yet somehow doesn't warrant any other tags, possibly a checkbox could allow bypassing this prompt.


Of course, that suggestion is pretty targeted functionality applied to a general area - this is why I'm tagging it as discussion first, to work things out, and determine what/if to put in a feature request.

I would see this as a generic "tag rule" - maybe limited to "if only tag X, show prompt Y" or maybe a more flexible set of conditions/actions to also allow "if tag combo X+Y do Z" type rules, but I guess that depends on if there are any other use-cases that would make that worthwhile.

If anyone has other ideas on how to encourage people posting regex questions to state what tools they're using it with, without having to waste answerer's time, that'd be great.
(Or indeed if there are other examples which follow the same pattern.)

1

I think this is a general tagging issue and not necessarily worth adding in extra functionality.

Those people who for whatever reason don't tag properly are still likely to do the minimum required to get the job done as they didn't put in the effort to think in the first place.

Unfortunately in these cases if the question is reasonable and the answers are good the community will help with re-tagging.

If the question is bad and has been tagged poorly then that's what down-voting is for.

1

On meta sites, we have "required" tags (eg. ) and "normal" tags (eg. ). If a question does not have at-least one of the required tags, then it cannot be posted.

Maybe we could add a similar functionality to non-meta sites. Tags would be "required" by default and then be voted into the status of "normal".

Some good candidates for demotion are:

...


Actually, I think "normal" and "insufficient" would be better terms but didn't want to confuse the issue by changing the behavior of "normal"

  • the problem is that there would be hundreds or thousands of "required" tags which makes the error message very hard to write. Or read, actually. – Kate Gregory May 26 '11 at 12:14
  • @Kate, I wouldn't suggest listing all the "required" tags in the error message. Maybe a something more along the lines of "The tags you have selected are too general, try adding a more specific tag." Also, the different types of tags appear visually distinct, this should help along with good names for the different types of tags. – Brian Reichle May 26 '11 at 12:29
  • I'm tempted to +1 this as it would make for excellent tags to filter by! I could get rid of hundreds of thousands of questions I don't want to see with relative ease. Of course I don't think this is what they have in mind for SO. – user7116 May 26 '11 at 13:56
  • @sixlettervariables, I'm not suggesting any new tags, we already have all these tags. I'm simply suggesting a way to prevent them from being used on their own. – Brian Reichle May 27 '11 at 8:27
  • I'm with you now. – user7116 May 27 '11 at 13:23
-1

Hmmm, I wonder if they could work this in the code with tag synonyms. Tag dependencies.

You must log in to answer this question.

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