This question already has an answer here:

I spent many hours researching on Stack Overflow for help on a particular programming challenge. I didn't find an answer close enough to what I was looking for. I was going to post a new question, but as I was writing it up I kept thinking of new approaches. Eventually I was able to write a function to solve the problem.

My question is, for the benefit of the community, can I post a question and the answer immediately? Is this frowned upon? Can I accept my own answer?

A secondary question, and maybe unrelated to Meta, is there a place on Stack Exchange to share code snippets? In this case my question relates to VBA and regular expressions.

marked as duplicate by Sonic the Bracketed Hedgehog, PolyGeo discussion Feb 11 at 3:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


From a "related" link that popped up after I posted this question, it seems that it is acceptable and encouraged to answer your own questions if at least one other person can benefit from it. (I searched meta before asking this question. Really, I did!)

Posting and answering questions you have already found the answer to

  • Ironically answering your own question can quickly generate down votes if it is discovered as a duplicate. Go easy. I'm new and I want to contribute. – Ben Feb 11 at 4:54
  • That is why it is a good idea to always post comments to both the question and the answer to such self-answered questions, explaining why self-answering is OK, perhaps also linking to the meta question about self-answering. – Peter Mortensen Feb 11 at 7:51

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