Except in 99% of cases the person is asking an xy problem, and if they ever explained the why, they would get a proper answer.
Often the reason no one does the hyper-specific thing, is that there are better non code solutions, it’s massively insecure, or is just stupid micromanaging.
Which is fine when people do not reject the answers that are different from what they were expecting. Learning that the problem you have is a reason that noone does this, is a valid thing to learn.
It’s usually when I see people moving the goal posts on replies, or complaining that they didn’t answer the exact question that i see as frustrating. Or “I don’t want to do that” with no more info.
But if you are aware of other solutions, you should state that in the question and give your reasons. It’s a waste of time if you know someone might suggest what you have dismissed already.
The html question is a classic for this, they want to find non self closed tags. Why? Why can’t they use a parser? What are they doing with this info? All questions that would give you a good idea on how the problem can be solved. Playing with regex would be a valid answer to that, but is not stated. Unfortunately I find so’s format discourages extra interrogation.
The answer is not an attack on the person, but a frustration at the people before that ignored previous answers to use a parser.