-6

Should and be synonyms? Should they actually exist at all?

Currently, only has 138 questions, and no watchers. , however, has 1.4k questions, and 48 watchers.

My opinion is that both of these shouldn't even exist, but since they do, and my guess is that the community consensus is that they're ok, at least they shouldn't be separate: They are about the same concept, after all.

1 Answer 1

4

Should and be synonyms?

No. Capture groups are not the only regex groups out there. While capture groups are commonly used, there are also non-capture groups and atomic groups. (You can find an outline of regex groups in Reference - What does this regex mean?) Regex groups are more general (as suggested in the tag wiki of ) while capture groups are more specific (as suggested in the tag wiki of ). The situation could also be illustrated with sets.

capture-group is a proper subset of regex-group

We can translate this to "all capture groups are regex groups but not all regex groups are capture groups". This suggests a non-synonym. If the terms were synonyms, the sets A and B would be equal (to an extent?). But this is not the case here.


Should they actually exist at all?

Sure, why not? From the tag help page:

Tags are a means of connecting experts with questions they will be able to answer by sorting questions into specific, well-defined categories.

Tags can also be used to help you identify questions that are interesting or relevant to you.

(emphasis added)

Regex groups and capture groups are both specific, well-defined categories. (so) is a regex group (assume the parentheses are escaped properly). \bso\b isn't a regex group. Well-defined. (so) is a capture group. (?:so) isn't. Well-defined.

People wanting to know more about regex groups and capture groups can also look up the tags individually. The search becomes more difficult without tags to categorise questions into.

4
  • There's also this answer which explains the regex groups and the capturing groups. And also there are differences in the tag wikis which you should also highlight. Jun 3, 2019 at 6:38
  • @double-beep capture-group currently has no tag wiki. (I guess that's a difference in itself?) I'm wondering if you were referring to capturing-group vs regex-group instead.
    – TrebledJ
    Jun 3, 2019 at 7:00
  • Yeah, capture-group and capturing-group appear to be synonyms, since all of the questions are about regex. There's already a meta about it: meta.stackoverflow.com/q/317673 Jun 3, 2019 at 7:01
  • Yep, that was a complete mental glitch on my part. After sleeping on it, I woke up expecting a ton of downvotes (way more than I actually got). Thanks for the answer! Jun 3, 2019 at 11:58

You must log in to answer this question.

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