34

I recently crossed the 2k mark, granting me access to the Suggested Edits queue. What should I do about the following suggested edit:

Suggested edit to remove C# tag

All the edit does is change the tags, which so far should be fine. However:

  1. Regex flavours differ from language to language so while this question never mentions C#, it might be relevant. Maybe the question itself needs editing to mention its desired language?
  2. The question is nearly 10 years old at this point and if this truly was a relevant edit, I would've thought it would have been made by now (considering it also has 34.5k views).

I have decided to reject the edit on these grounds, quoting "Regex flavours differ from language to language so the C# tag is likely relevant." - was this the right action to take?

14
  • 11
    Yes, flavor is often relevant. Unless OP indicates that they originally mistagged, the language should not be removed Feb 6, 2019 at 11:21
  • 9
    This is also why I can't stand people who obsessively remove any and every mention of a language from the title of a question. Folks, this is what happens when you do that.
    – BoltClock
    Feb 6, 2019 at 11:26
  • For convenience, could you also link to the question please?
    – Wai Ha Lee
    Feb 6, 2019 at 11:31
  • 1
    @WaiHaLee here's the suggested edit in question: stackoverflow.com/review/suggested-edits/22131337 Feb 6, 2019 at 11:32
  • Read the question. It boils down to "Regex to verify that it has @ like emails". That's all it ask.
    – Braiam
    Feb 6, 2019 at 19:16
  • On a separate note, I think I remember that user from other edits they've made and I rejected.
    – VLAZ
    Feb 7, 2019 at 5:57
  • @VLAZ does not looks so unless they edited some very bad posts... as there is only on recent edit on their profile (with 3 total edits) Feb 7, 2019 at 6:57
  • @AlexeiLevenkov the review would have been a long time ago few months, at least. I've not been doing reviews recently. And the rejection is a bit of a conjecture on my part - I recognise the avatar, so I assume it's the same user. And I remember it from a review. The only reason I can find for remembering a review is rejecting it. But in fairness, it might have been a different user or maybe the same user but theirs was the post, not the edit. It's also possible I might be misremembering, as well.
    – VLAZ
    Feb 7, 2019 at 8:08
  • 1
    @Braiam I did read the question. The issue is that different languages have different nuances when implementing regex, so having the language is often helpful. For example, I often have to correct people in the Scala tag when they suggest regex answers that do things like escaping forward slashes, because that isn't something you need to do in Scala (but do in other languages) and the compiler throws an error complaining that you're trying to escape something unnecessarily. Posting non-compiling regex because you haven't had enough information (or ignore the language) is an issue. Feb 7, 2019 at 11:00
  • But not in all cases. For that you need ti read the question. Having a blanket statement that all regex questions needs flavor is counter productive. Heck, the wikipedia page for diferentes between implementations, almost all languages on that list implement the same features. From the point of view of someone developing software, the regex syntax is the same in most cases. Requiring language tags for regex questions should be the exception, not the rule.
    – Braiam
    Feb 7, 2019 at 12:00
  • 1
    I agree there should be a context tag. About this particular example edit, shouldn't the tag be ".NET" instead of "C#" anyway? As the underlying regex engine is indeed .net (and thus applicable to powershell, visualbasic, and other non-C# things based on .net?
    – Pac0
    Feb 7, 2019 at 16:29
  • Sooo, has someone had a chat with the editor in question? And how many more of these bad edits have they made that have been approved?
    – Ian Kemp
    Feb 8, 2019 at 7:46
  • IMO all this discussion is moot since the question should be closed (or locked) as it is waaay too broad by 2019's rules.
    – Ian Kemp
    Feb 8, 2019 at 7:48
  • @Ian that's true for that particular question, though I think it's a worthwhile thing to get community consensus on for future reviews which aren't as broad. Feb 8, 2019 at 15:47

1 Answer 1

51

Language tags should not be removed from regex questions.

While the question is indeed a regex question, regex has many specific implementations that differ between which programming language is used. Without knowing which implementation the OP is using, you can't be sure if an answer is valid.

You can check Wikipedia on differences between regex in languages (the fact that they split the comparison table in two already tells you a lot).

The regex excerpt also states that adding a language is required. Removing a language is a bad edit.

From the excerpt

All questions with this tag should also include a tag specifying the applicable programming language or tool

The fact that the accepted or top answer might work under many different languages is not a reason to remove the language, since future answers might want to include less broadly implemented features.

5
  • 3
    split [..] in two ... let me guess: it is split in the good parts and the bad parts?
    – rene
    Feb 6, 2019 at 12:46
  • 1
    The real parts and the imaginary parts. Either that, or the combined table would just be too wide to fit on the screen. Feb 6, 2019 at 18:12
  • 1
    Now if only I could remember the syntax for splitting into two parts - is it () or []?
    – BJ Myers
    Feb 6, 2019 at 19:01
  • 1
    Is funny that the wiki table is mostly filled by application implementations rather than language ones.
    – Braiam
    Feb 6, 2019 at 19:07
  • 1
    @Pac0 Yes, indeed. While you could edit it to switch tags, I don't think it would really be easier to find (since I think people are more likely to use C# as a search term than .Net) or have any other benefits, except that it's perhaps more correct. I'd discourage retagging regex + C# to regex + .Net, even though it makes the tags more accurately reflects the regex engine the question is asking about, but that's debatable.
    – Erik A
    Feb 7, 2019 at 16:35

You must log in to answer this question.

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