This question is tagged "perl" as well as awk and sed and asks about a regular expression.
Find number in string and replace it

At what point do questions that are answered with programs move from our scope to SO?

  • 2
    Those are all computer programs that don't require their user to be a programmer. I don't think a question that a power user could ask themselves would ever be off topic here, even if the answer suggested them to write a little bit of Python or Bash, or "just" a regex,
    – slhck
    Dec 12, 2013 at 21:56
  • The first words of the question are literally "I wrote C++ code". I'd think it's not fuzzy, and clearly SO material.
    – p.campbell
    Dec 12, 2013 at 23:09
  • @pcampbell The OP wants to replace a string in a file. The content of the file doesn't matter really. Not saying that the question would be off topic for SO but it's definitely not off topic here.
    – slhck
    Dec 13, 2013 at 5:17
  • 1
    @p.campbell So you'd consider "I worked with some CUDA code and my screen went black. Is my GPU overheating?" to also be SO material?
    – Daniel Beck Mod
    Dec 13, 2013 at 5:17

1 Answer 1


It's a really fuzzy area.

On one hand, we can't retroactively judge a question as topical or not based on what kind of answers it gets. If a question is asked that appears on the surface to be topical, but then all the valid answers involve some programming, it's not suddenly off-topic. We can't expect a user to know beforehand the complete implications of the question they're asking. And if they're getting good answers here, ones that solve their problem, there is not a strong case for migration. Migration is only really useful when the answers they get here are poor, too general, not helpful, etc.

On the other hand, questions that themselves ask about actual programming languages (how do I do X in Python, Bash, etc.), are more likely to be considered off-topic and migrated to SO. If the question contains either significant code (in some programming language) or a request for code in some specific language(s), it's clear that the querant understands that this is the domain of programmers or at least sysadmins, and not so much power users.

If it were me, the original question you posted would've been voted close to migrate to SO, but the OP has already accepted an answer, so it's clear that the subject matter was in the area of expertise of SU users. It makes almost zero sense to migrate a question with an accepted answer to another site, especially if the user is completely satisfied with that answer.

Migration due to better-suitedness of a topic to SO is primarily reserved, in my mind, for questions that get very poor answers (or no answers at all) on SU, and for whom the subject matter is pretty clearly applicable to SO. And the question can't be crap, either: electronic fecal matter only flows in one direction on the StackExchange network; from SO to other sites.... but if we do our job (and we generally do), not in the opposite direction.

  • Are you saying that because JourneymanGeek makes good answers that gets afterwards migrated to Webapp or SF, we should stop migrating them because they get better answers here? That someone here knows the answer doesn't make the question on-topic automagically here.
    – Braiam
    Dec 12, 2013 at 22:15
  • 2
    By the way: We never migrate Bash questions (or AppleScript, VBS, what have you). Those aren't off topic. The general rule is never to migrate anything that's within the scope—the only exception being when there are poor answers and when the OP explicitly asks for migration.
    – slhck
    Dec 13, 2013 at 5:15

You must log in to answer this question.

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