No, is this not a valid text for a Stack Overflow answer.
In my work in some of the largest US tech companies over nearly 30 years, I have many times witnessed these types of flippant emails. They are not only un-helpful, they are purposefully harmful. In successful start-ups people who write/say such things are quickly removed. Successful professionals quickly leave environments where such things are tolerated. The onus is upon managers to handle this -- refer to The No Ass Hole Rule. (of course actual, idiots are removed as well, but not as fast)
A better way to address a "stupid question" (in school, I was told these do not exist), is to explain why it is stupid, doing this along with the actual answer seems to me to be appropriate, but often the answer is not embedded in such flippant replies. This equates to wasted time for the writer and readers (I'm guessing the writer does not consider that the aggregate time to read could be much greater than the time to write/spew his/her/its flippancy). In the case being discuss here, the answer was included--for me, that would be enough to quell my anger if I was the asker.
Another thing I have noticed over the years is that many times there are subtle aspects/contexts/etc. that are missed by the flippant answerer. These aspects/contexts often make these seemingly "stupid/simple questions" very interesting/complex.
Ideally, "take it off-line". If the system allows it, talk to the asker privately and nicely somehow rather than humiliate someone.
Or just "keep your mouth shut".
\d+ regex
, so an edit would need some extra consideration in my opinion. Hence the question.