Using this question as example for my question.
This question is basically asking for a correction to a regular expression to add quotes around an unquoted array identifier and gives an example.
A user posted a (now deleted) answer, which only solved the outlined example (replacing name
with 'name'
) and did not solve the general problem. (At least in the revision I last noticed. It's now deleted and I'm below 10k rep so I can't see if it was improved before it was deleted.)
The answer was also unlikely to point the user to a working solution as it can be assumed from the question that he does not know which strings need to be replaced before the script is run.
I downvoted that answer and upvoted (later) the answer that should actually solve the problem (which is also accepted now) and flagged the first answer as not an answer. However, that flag got disputed.
Was I right in flagging and downvoting that answer or was it considered an acceptable answer?