Sometimes I write answers that may help the OP to solve the actual underlying problem, but match the question as stated only tangentially.
That can work out great, like when the answer matches the OPs XY-problem so it get's accepted, or it gets voted to the top because reader think it's useful even with some change in scope.
Normally, it works out ok, maybe getting some upvotes indicating that the alternative approach may indeed be a good idea.
Sometimes I think the answer could be really useful - in the context of the right question.
In the case that the answer is good in answering a useful question, but one that is too different from the original question to be regarded as a good answer,
I could create a new question matching my answer (or find an existing one), delete my answer from the old question and use it to answer the new question.
I would like to know whether that is acceptable as described, or in some variant?
(e.g.: not deleting the old instance of the answer)
As an example of the problem, see this answer on Dealing with file names with special first characters (ex. ♫), which is proposing a more general approach that could solve the OP's task, but would create much overhead when used for this task.
It is useful anyway because it can solve many tasks related to the OPs question.