133

For example, today I saw yet another such question - Check if a string contains at least 10 digits, 12 uppercase letter and 20 lowercase letter. This is not the first one I'm seeing, either.

  • Should they generally be closed?
  • What close reason? The only answer so far suggests Off-Topic -> Why isn't this code working, but I disagree with that, since the askers don't provide code at all - they are requesting code to be provided to them!
  • Should we use Reference - What does this regex mean?, even though the title implies only "explain this regex" questions should be closed as duplicates to it?
  • Or should a new canonical question be created? Any suggestions for its title and content, and answers would be appreciated.

Edit: The reason I believe my question is not a duplicate is that for regex, it is possible to create a canonical answer and mark the questions as duplicates to it. That is obviously not possible for What's the appropriate new/current close reason for "How do I do X?", therefore it is not an exact duplicate. Similar, but not the same.

15
  • 194
    Judging by the amount of basic regex questions we might need a new site... RegEXchange?
    – runDOSrun
    Commented Feb 10, 2015 at 11:49
  • 11
    YES, please close them. I am a subscriber to the tag and sift through the email feed notification just to cast CVs on whichever ones I come through.
    – Unihedron
    Commented Feb 10, 2015 at 15:23
  • 2
    @Unihedro Close reason? The only answerer suggests one that is not suitable IMO.
    – sashoalm
    Commented Feb 10, 2015 at 15:24
  • 3
    @sashoalm Why acquire a close reason? Just close ALL the regex questions. The end is near!!!
    – Unihedron
    Commented Feb 10, 2015 at 15:25
  • @sashoalm check the comments in the meta thread Regex reference and its fate of the reference. We've tried many times to convince Robert Harvey to unlock the question, so far he didn't. This means we can't change the title nor the content.
    – HamZa
    Commented Feb 10, 2015 at 15:35
  • Perhaps you could give more examples - I agree with @sashoalm that the only answer here suggests an unsuitable close reason. I'm also not convinced that regex should be singled out for 'extreme prejudice' based on the example above. If someone has tried for themselves and is worried about technique/best practice then it seems a reasonable question. Commented Feb 10, 2015 at 15:49
  • 1
    @Sam no, having working code and asking about "best practices" is generally off-topic for SO.
    – CodeCaster
    Commented Feb 10, 2015 at 16:11
  • 1
    Partially-working code which itself is full of workarounds seems on-topic to me. There are plenty of non-regex examples of that kind and it fits with the overall mission of improving good programming knowledge. Commented Feb 10, 2015 at 17:17
  • 5
    I don't think the linked question is that terrible; the author clearly did some research, even proposes a (possible) solution, and explains why he/she thinks it's not a good one. It might not be a great or very interesting questiont to answer, but regexps can be difficult & confusing. (that being said, I have also noticed a lot of "regexp me a foo"-questions, but this is not an example of one). Commented Feb 10, 2015 at 23:51
  • Yes, questions which ask such a thing obviously do not make use of a search engine for there are multiple sites which can provide the regex for a given string and give you the code to do it for various programming languages.
    – AStopher
    Commented Feb 11, 2015 at 9:48
  • Would it be advisable to have a canonical regex answer - and have all the other posts marked as a duplicate? There are sometimes a few original regex questions that ask for something uncommon or difficult- but generally that is not the case. Commented Feb 11, 2015 at 12:15
  • I think that "RTFM" is just four chars. Commented Feb 12, 2015 at 3:58
  • 5
    @LéonPelletier, RTFM is absolutely against the culture of SO. Yeah, lazy answers are frustrating, but blatant rudeness is more so. I learned early on in SO that if you can't say something nice, say nothing and move on. Commented Feb 12, 2015 at 7:48
  • possible duplicate of What close reason should I use for give me teh codez? Commented Feb 14, 2015 at 21:29
  • 1
    Does this answer your question? Why is "Can someone help me?" not an actual question? Commented May 31, 2020 at 5:07

7 Answers 7

80

I think most should be closed with extreme prejudice. A vast majority of them show extreme laziness - there are countless sites out there with libraries of contributed regexs and tutorials and test pages. Fundamentally it is no different to someone saying "My Foo class doesn't work, can you write one for me?" - most people here wouldn't hesitate to close a question like that.

The example you linked to is not as bad as most - the OP showed what they had tried and explained why they considered it faulty and suboptimal. At least that OP put a little bit of effort in; most don't.

The question Reference - What does this regex mean? should be fine to use as a canonical answer, unless the OP can illustrate a very specific problem that they cannot solve -- then they deserve a specific answer. If you feel that suggested canonical is missing something then jump in and add to it - it is a community developed question/answer.

What close reason should be used?

This canned one is pretty close:

Close vote dialog box with red freehand circle around "Questions seeking debugging help" reason

Some might argue the semantics of this specific reason, personally I think if they just show up and request a regex then they've failed to provide the shortest code necessary to reproduce.... If that doesn't sit well with you then use a custom close reason. And don't forget to consider a down vote and possibly a comment. Whichever option feels right for you, don't just walk away - deal to that question!

26
  • 2
    What close reason should be used? Duplicate to that question - Reference - What does this regex mean?
    – sashoalm
    Commented Feb 10, 2015 at 10:44
  • 1
    @sashoalm I've edited that into my answer.
    – slugster
    Commented Feb 10, 2015 at 10:55
  • 67
    As long as we have a few high-rep users dedicated to spoon-feeding regular expressions to even the most hideous questions, the close-voters lose. How do we encourage high-rep users to not answer crappy questions? How can we educate users that think "I need a regex but it's so hard" to realise that basic regular expressions aren't scary at all?
    – CodeCaster
    Commented Feb 10, 2015 at 11:23
  • 11
    @CodeCaster I downvote such answers personally. A mediocre answer to a crap question might as well be a crap answer for all the good it's going to do for the site.
    – Clive
    Commented Feb 10, 2015 at 11:40
  • 2
    @slugster But there is no code (that the user provides - he's asking for code).
    – sashoalm
    Commented Feb 10, 2015 at 11:50
  • 9
    Bad quality or flagged questions shouldn't be answered and as such I downvote them as well (on a case to case basis)
    – runDOSrun
    Commented Feb 10, 2015 at 11:51
  • 1
    @runDOSrun I personally hate typo questions with an obvious answer that gets 4-5 upvotes in 20 seconds and you see the counter going upward in seconds - I can practically feel the decrease in question-quality this brings with each upvote.
    – sashoalm
    Commented Feb 10, 2015 at 11:57
  • 25
    I am all for closing these questions, but I believe the suggested close reason is not ideal. Their question is frequently very clear (ie "I want xxx to do yyy") but has no code at all. So telling them "Questions seeking debugging help ("why isn't this code working?") ..." just confuse the asker. I do not see any better reason in the list. I think there should be a standard answer for the "write code for me" questions and that standard answer should be easy to understand for people new to Stackoverflow.
    – AdrianHHH
    Commented Feb 10, 2015 at 13:14
  • 29
    Keep in mind that laziness has never been a reason to close.
    – George Stocker Mod
    Commented Feb 10, 2015 at 13:36
  • 9
    If the question is just asking "How do I do <X> with Regex?", then it isn't "seeking debugging help" and I don't believe that close reason fits.
    – Ajedi32
    Commented Feb 10, 2015 at 15:01
  • 8
    The main problem is this: we don't have a close reason saying "OP, get your act together. Start doing some research and try to solve your own problem. We are not a free coding service."
    – HamZa
    Commented Feb 10, 2015 at 15:06
  • 3
    @Ajedi32 correct. I miss those days. I usually use: "unclear what you're asking", "too broad" or a custom close reason. In general, I've lost the interest in moderating the site. Like CodeCaster said "As long as we have a few high-rep users dedicated to spoon-feeding regular expressions to even the most hideous questions, the close-voters lose".
    – HamZa
    Commented Feb 10, 2015 at 15:13
  • 2
    Don't really agree with this. A lot of the public regex libraries are full of awful rubbish - regex's that don't do what they say on the tin, fail edge cases or don't work across multiple regex interpreters. It seems neither lazy nor unreasonable for someone to come here asking for a version that's fully functional, and perhaps wanting some further explanation of how it works.
    – Bob Tway
    Commented Feb 10, 2015 at 15:46
  • 3
    @QPaysTaxes It is "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself...." etc. Commented Feb 10, 2015 at 15:51
  • 3
    @Lankymart for people new to Stackoverflow that does not make sense. It opens with "Questions seeking debugging help ("why isn't this code working?")" but no code was included. The rest of the reason "must include ... and the shortest code necessary to reproduce it in the question itself" will probably be ignored. As it is later in the message it appears less important. Perhaps the reason should be rewritten as "Questions seeking help with code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself".
    – AdrianHHH
    Commented Feb 11, 2015 at 14:18
66

To counter the current popular answer, absolutely do not close such questions as

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.

Such questions do give a specific problem. Such questions do give the shortest code necessary to reproduce it (i.e. none). Such questions do give a clear problem statement.

Using this as a close reason is not just a rude signal to the person asking the question, but also to the site. Using this as a close reason shows that you don't care at all about the rules here, you will do whatever you like, so long as the end result, that questions that you don't like end up closed. Those aren't the rules. Questions shouldn't be closed based on your personal opinion. Questions should be closed if they're against the rules.

The tooltip for downvoting shows "This question does not show any research effort; it is unclear or not useful". That is certainly appropriate. That is exactly the problem you point out with such questions, and the site makes it crystal clear that downvoting is the action to take.

I can see some wiggle room for too broad:

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.

If someone clearly doesn't even understand the fundamentals of regexes, then a good answer (not just one that the OP would accept), that doesn't just give the regex, but also explains it in a way that the OP actually understands and benefits from, might be too large to be a good fit for SO. It's a stretch, and personally I wouldn't close it for that.

A canonical question & answer seems like the best way to get such questions closed, within the current guidelines, to me. However, a canonical question & answer would need to cover all sorts of different regex syntaxes to be useful, and would need to cover those different regex syntaxes in such a way that it still doesn't distract someone too much who's only interested in one of the forms. Creating a useful starting point for this is something I would like to do, but not something I'm capable of. I could merely help if a starting point has already been created.

Since there is no such starting point yet, I would downvote the questions, and move on.

15
  • 26
    Posting such a question in the first place is IMO the "f*** you" to the site. We expect people to do research and have a minimal understanding of what they're doing (the close reason was removed as it was abused, not because we no longer require people to have a basic knowledge of the subject). I agree the close reason is not a perfect fit and "too broad" would be better, but quickly closing and deleting such questions is the important part, not the reason. And re canonical quesiton, that would mean the dupes are not cleaned up by the roomba but stay on the site until they're deleted manually.
    – l4mpi
    Commented Feb 11, 2015 at 12:37
  • 3
    @l4mpi I wholeheartedly agree that posting such a question in the first place expresses that same sentiment, and that action should be taken to strongly discourage such questions. I disagree, however, that we should mis-use the tools we're given to achieve that faster. We can downvote such questions. We can downvote answers to such questions. And I believe that if the majority of the community can agree with that, that downvoting will do a good enough job of achieving that.
    – user743382
    Commented Feb 11, 2015 at 12:42
  • 16
    I'm not a regular in the regex tag and only observe those questions when they spill over into python or java, but in the cases I observed, downvoting does not do a sufficient job. First of all, too many people upvote even the worst questions (e.g. this, 3 upvotes for copypasting code). Second, if people get an answer to their crap questions (which they always do), they'll keep on asking the same crap; they care for answers, not votes. They may get banned, but nothing stops anybody from making a new google account to get a fresh start on SO.
    – l4mpi
    Commented Feb 11, 2015 at 12:49
  • 1
    @l4mpi I mainly follow the c, c++, and c# tags, and if the question you linked to is one of the worst questions, then you're lucky in the python tag. :) That's a question that shows minimal research effort (the OP did search for code to achieve the desired result, but indeed nothing more than copying and pasting), and I agree that such questions should be downvoted. I may be mistaken, but I seem to recall notorious offenders being banned on a lower level than account, so that even creating new accounts wouldn't help them.
    – user743382
    Commented Feb 11, 2015 at 12:56
  • You're mistaken; there are a few IP-level bans for flooding and such (e.g. a time limit for low rep users asking questions from the same IP) but there is no way SO can know if two google accounts belong to the same person and thus there is nothing they can do to to ban users "on a lower level" (afaik there is no such level, even). And yes, there are of course worse questions in python; but the problem is that many people nowadays upvote questions as long as OP can spell and dump any answerable problem, no matter how underspecified or useless or unresearched.
    – l4mpi
    Commented Feb 11, 2015 at 13:10
  • 1
    @l4mpi Here's what I was thinking of. "Can I simply create a new account? No. The automatic ban is at a lower level than account." linking to Jeff Atwood's comment "it is permanent by IP, it is lower level than account".
    – user743382
    Commented Feb 11, 2015 at 13:16
  • Yeah, but I believe this is total BS. Note that there's no explanation of how it's supposed to work. And as it's all based on OpenID, I'd say it can't possibly work; if I decide to create a new account with a new google address, the only thing that SO can use to link it to my current account is my IP (and no, they don't ban public IPs); which is easily changed or bypassed completely by using any public network for the account creation. Furthermore, there were enough cases of people bragging on meta about repeatedly doing that, see e.g. this.
    – l4mpi
    Commented Feb 11, 2015 at 13:20
  • 1
    @l4mpi Okay, that's food for thought, but also a discussion I'm not getting into. :) Thanks for the link.
    – user743382
    Commented Feb 11, 2015 at 13:28
  • 1
    I agree with you. I also don't believe this type of question fits that close reason. I believe the real sentiment is "too simple to be worth our time." StackOverflow is about donating time. I hope it is. Commented Feb 11, 2015 at 17:45
  • 1
    What exactly do you achieve by down voting and moving on? A lousy question still remains open. We could argue the semantics of the close reason till the sun goes down - I think providing no code at all and simply asking for a ready made solution has definitely failed to provide the shortest code necessary. Of course if you don't think the canned close reasons are close enough then use a custom reason, but don't just down vote it and nothing else. And there already is a good canonical answer - if you think it isn't sufficient then feel free to spend some time on it, it is community driven.
    – slugster
    Commented Feb 12, 2015 at 5:58
  • 5
    @slugster It has provided the shortest code necessary for explaining the problem. It has indeed not provided the shortest code necessary for making it a good question, but that isn't what the close reason is about. Yes, a lousy question remains open, but the site very strongly implies we're not supposed to close them any more. The answer linked to in the question, IMO, is a good fit for other regex questions, but not for how to do X with a regex.
    – user743382
    Commented Feb 12, 2015 at 9:33
  • 1
    @LanceRoberts If you feel that my language was offensive, then I apologise, but the way you censored it, it is still equally offensive. Your edit doesn't help there. I've now edited it in a way that should be more agreeable.
    – user743382
    Commented Feb 12, 2015 at 16:45
  • @hvd, I'm fine with that. Commented Feb 12, 2015 at 17:04
  • 1
    Such questions do give a specific problem. Such questions do give the shortest code necessary to reproduce it (i.e. none). Such questions do give a clear problem statement. - Totally disagree. This is a work request, there is no programming problem here at all. The problem is no more complicated than "I need a developer to write some code for me", and we definitely don't go for that here.
    – J...
    Commented Jul 5, 2018 at 11:17
  • 1
    Being given such ill-fitting close reasons, vis-a-vis the site's goals and purpose, is the real "F you" from the site to us. Commented May 13, 2022 at 21:24
22

At the end of the day - it's about reward and reinforcement. If I ask a stupid question, but get an answer that solves my problem then ... I'll do it again. Because it worked.

It's not just regex questions where this happens - they're just an example of one place where there's low hanging fruit. Supplicant gets answer, and answer-er gets rep, because their answer was right.

There's no easy solution, because both participants are getting the reward they desire. The only way you could break that cycle is to stop rewarding one - or both.

So perhaps: Closed questions lose the rep reward? Closed and downvoted questions give a small penalty to anyone answering? Maybe a rep bonus for (appropriately) closing questions?

The whole point of SO is that rep is the payoff for 'good behaviour' and rep brings with it powers. So we need to ensure that we don't inadvertently reward 'bad' behaviour. That's assuming we consider answering lazy questions to be 'bad' of course...

8
  • 2
    I didn't say that. Merely that 'give me a regex for...' is a lazy question.
    – Sobrique
    Commented Feb 11, 2015 at 18:02
  • you literally said that regex questions are stupid questions.
    – asmeurer
    Commented Feb 11, 2015 at 20:56
  • Much as I love a good regex puzzle, most of these questions are not interesting at all - not worth burning the calories to even think about. (I admit I personally have answered a couple that way -- that is, without engaging any higher thought processes). Cutting down the rep when answering what others say is a bad question is actually a pretty neat idea!
    – Jongware
    Commented Feb 11, 2015 at 21:32
  • 7
    I strongly dislike the idea of penalizing people for trying to be helpful and providing good answers, regardless of the quality of the question. Answering questions constructively is good behavior regardless of the supplicant's behavior. Now, I had always thought that closed questions lose rep reward. If they don't, I'd say they should, though I think penalties beyond that would be extreme. Commented Feb 11, 2015 at 23:21
  • @kbrimington I'd like to penalize them for answering in an answer instead of a comment. A regex can be provided in a comment, it's not big or anything. I personally sometimes do help by providing an answer in a comment, but after I've downvoted the question, because it's still bad.
    – sashoalm
    Commented Feb 12, 2015 at 8:59
  • 2
    I can understand that point - I mean, we do want people to answer questions. But the thing is - we do get a self perpetuating cycle. If we want good and valuable questions, we need to stop rewarding 'bad' questions with answers. It's the standard help-vampire <-> rep-whore cycle. You can only break that loop by stopping the help vampire (by stopping them getting their answer) or the person 'feeding' them. Or accept that 'bad questions' will just happen, and that's the end of it.
    – Sobrique
    Commented Feb 12, 2015 at 9:20
  • "Closed questions lose the rep reward? Closed and downvoted questions give a small penalty to anyone answering? Maybe a rep bonus for (appropriately) closing questions? " just vote to close, downvote the question to obvlivion and vote to delete
    – Braiam
    Commented Feb 12, 2015 at 17:53
  • 2
    Don't questions with upvoted answers inhibit deletion?
    – Sobrique
    Commented Feb 12, 2015 at 18:08
16

Ultimately, I see this as coming down to (from the tour, even)

Don't ask about...

Questions you haven't tried to find an answer for (show your work!)

Has the person asking the regex question at least made an honest effort to solve their problem? Do they at least show a basic grasp of fundamental/rudimentary regex concepts? Or are they asking without any evidence that they really tried (aka "do this work I can't be bothered with for me for free")?

Regex is much like Othello. It's easy as pie to write a basic regex. But once you turn to more complicated regex patterns/issues and to performant related problems, everything suddenly goes from 10 minutes of looking up a regex manual to headaches of trial, error, research, and unexpected gotchas or tricks that aren't apparent at face value to someone who only rarely (at best) writes regex patterns.

In effect, there are methods of matching certain desired patterns in Regex that could be equated to expecting someone to come up with the Muenchian grouping method in XSLT… all on their own. Because grouping in XSLT is such a dirt common need, and relatively easy to word as a search, it's not hard to find the information needed to implement it in XSLT 1.0 (but people still get stumped on particulars of the method in application to exact circumstances, resulting in appropriately narrow questions). It's frequently much harder to word a search based on a pattern need in such a way that it captures the concepts that need to be applied to make it work.

I don't see a problem with these questions, when they do show appropriate attempts at solving them before asking. Honestly, in the case of the linked question, I don't think it should be closed:

  1. There is regex code there that the asker came up with to try to use. The asker clearly tried to arrive at their own solution: whether by looking up a regex or trying to create their own.
  2. There is an attempt to take the code in the direction of solving the asker's desired outcome, with related comments about why the asker isn't using that particular code.

In the end, if someone can't figure something out on their own but is actually trying to do so, the best answer may just be to walk away if it bothers you. It's not hurting anyone, and if there is a particular area to it that was being difficult for someone it may be helpful to others in regards to seeing how to work out that particular detail. If that's not the case, no one should be voting up the question or any answers it does happen to receive, which effectively lets it all but disappear.

While the wording of regex questions may often make this more difficult in practice than for some other questions, I think it still applies. I've personally had more than one XPATH issue get resolved by looking at what would have been a closed question if the regex question linked here were deemed to be something inappropriate and the same rubrics in turn carried over to XPATH questions. Not because the problem was exactly the same or the answer fit my problem per se, but because the logic behind it was what I needed for a situation that in part had some similar elements.

At the same time, if someone simply posts a problem with no evidence of having put effort into solving it themselves, it should certainly be closed. I would agree that if the following were true, the question should be closed:

What close reason? The only answer so far suggests Off-Topic -> Why isn't this code working, but I disagree with that, since the askers don't provide code at all - they are requesting code to be provided to them!

But that's not actually the case here.

For the times that is true, yes, the question should be closed as per slugster's answer referencing the Off-Topic close for debugging related questions lacking all necessary details: failing to provide an attempted regex pattern (one already showing evidence of having been worked on to try to reach the solution, not just a random copy and paste that makes no sense in the context of the problem) that isn't working fits well into this, to me.

8

Sometimes those of us who have been programming for a long time forget what it was like to be new and struggle. Perhaps, even, there are many in this community who either are naturally talented and never struggled with simple things like regular expressions, or they feel like they "put in their time" and others should do the same.

Regardless of why "Give me a regex" questions are unpopular, it is not clear to me how this is not part of the mission of SO. I've seen very simple C++ and C# questions answered with nary a complaint. I've found regex answers and shortcuts I wanted myself on SO and they saved me time and made my customers happy. Those who cheerfully provide answers, well, cheerfully do so. While this might not be the highest quality content on the site, I question just how harmful it really is.

Closing a question for the unspoken reason of "Moderators dislike answering simple regex problems" goes against the generally-constructive culture of Stack Overflow. I find it a little distasteful. This is why I prefer either downvoting the question or pointing the inquirer at a canonical reference.

Closing the question as "Seeking debugging help" doesn't exactly make sense, as the OP is not seeking debugging help at all. It is also entirely unhelpful, wheras closing as a duplicate to a canonical answer at least implies: "This may not be worth our time, but if you read this, you'll find the information you need to produce your own answer."

In my opinion, the bigger problem here isn't that regular expression questions are somehow a violation of the purpose of SO, but that the answers are generally low quality. Could the solution be to close answers (rather than questions) that don't explain themselves for the same reasons we close answers that only have a hyperlink to an external website? I would think that this would be extreme; however, a response that does not explain the regular expression with enough prose that a search engine could help others discover the answer adds little of lasting value to the site.

All this said, my opinion remains that downvotes are the most appropriate mechanism for dealing with this behavior.

7
  • 4
    I find that it is not part of the "mission" because it serve no one else but the OP with their specific, punctual question (usually). (mostly because, as you pointed out, these questions attract low quality answers).
    – njzk2
    Commented Feb 11, 2015 at 21:18
  • 4
    I also find there is a difference between struggling at some point and being new and all "Give code to me"
    – njzk2
    Commented Feb 11, 2015 at 21:19
  • 5
    Part of my point, though, is that some of the regex questions are really useful, and not just to the OP. If I encounter a lazy question, I ignore it or downvote it, but I consider taking a SO-won't-help-you-with-regex-because-its-not-SEO-friendly tone is something I don't think helps anybody. Commented Feb 11, 2015 at 23:10
  • 2
    @kbrimington "Regardless of why "Give me a regex" questions are unpopular" - I'll give you my reason. They're not reusable. No-one but the OP will ever benefit from the answer. The real power of SO is the questions that get 10,000 views - those questions get asked once, answered once, and then they save 10,000 man-hours by saving an hour of research for 10,000 people. For me, a rule of thumb is "Will this question ever get hits from Google?" If not, then it's not a good one.
    – sashoalm
    Commented Feb 12, 2015 at 9:03
  • 2
    I agree.. If we're not here to help, then what are we here for? It reminds me of the UBUNTU plea for linux users to stop patronising windows users and behave with a bit of respect. If one of you wants to write code from someone else and do it for free, out of the goodness of you heart, then I say go for it. What harm can there be?
    – Richard
    Commented Feb 12, 2015 at 17:57
  • @Richard: the harm is the encouragement of help vampirism. If someone asks a lazy question, and they get an answer despite complaints in comments, some of them will do it again. We are doing the community a favour if we can reduce this. However, if someone says "I'd like a regex to do X and here is what I have tried" then most people will help willingly.
    – halfer
    Commented Feb 13, 2015 at 0:29
  • 1
    Ahh.. yes.. if they're just asking for work doing without any examples I agree, it should be rated down at least. But I think if someone is asking a genuine question then we should do what we can to help. This site has helped me out so many times and I've never actually had to ask a question, usually I find the answers are already here, no matter how specific the question.
    – Richard
    Commented Feb 13, 2015 at 10:29
4

I tend to vote for closing with a custom message, usually along the lines of

... because it is about write code for me

I would support making this an official closing reason. (and it's not just about regex, it's about any language. e.g. Compare 2 Strings with the same words but different position)

1
3

I think they should not be closed by default.

People ask them, people answer them. I assume they are useful beyond the immediate question too: if someone searches for "regex to get extension from phone number" (made up example), it's great if they find a Stack Overflow page for the exact problem.

I don't see any harm these questions cause.

They should of course by closed for the usual reasons, mostly if the question is so bad that a useful answer is impossible.

8
  • In my defense, I don't have a single point of rep from regex questions :). Commented Feb 11, 2015 at 11:26
  • 4
    "People ask them, people answer them" - that's not a very good reason honestly. Think spam and signal/noise ratio - it has a real cost for those reading it who don't want to. Though I admit I followed the advice given to me by one of the commenters and added [regex] to my Ignored Tags. Let others deal with it.
    – sashoalm
    Commented Feb 11, 2015 at 11:31
  • 13
    There are many tags that are noise to me. I have no idea about iOS development. I don't think those questions should be closed. Commented Feb 11, 2015 at 11:34
  • 9
    I'm the goto guy in the office for regexes, however. I'm fairly good at them, and I'd like to answer real questions. Did you see the question a linked - "Make me a regex that checks 6 digits, 12 letters, and plus sign" or something like that. I don't want that. And what happens when tomorrow someone comes and says "Make a regex with 5 digits, 15 letters and a minus sign"? Another perfectly legitimate question, not a duplicate at all. After all the other question asked for 6 digits.
    – sashoalm
    Commented Feb 11, 2015 at 11:42
  • I see your point :). Still I would probably just downvote such questions. Commented Feb 11, 2015 at 11:52
  • 3
    I do that, rest assured.
    – sashoalm
    Commented Feb 11, 2015 at 11:55
  • 5
    @Daniel, questions in a tag aren't "noise" just because you don't follow the tag. That's a very bad analogy vs. the questions in and of themselves being worthy of closure.
    – Kirk Woll
    Commented Feb 11, 2015 at 20:59
  • @sashoalm "Real" questions? Seems pretty vague and opinionated. Commented Feb 11, 2015 at 21:02

You must log in to answer this question.

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