I find we have a very common class of problem here:
- Someone needs to do some string manipulation
- They recognise that a regex is one of the possible solutions, even if there are valid solutions which do not involve a regex.
- They ask for a regex solution, and tag their problem regex.
- Now other valid (or better) solutions that do not involve a regex are invalid answers.
When I find these questions, I ask if they need a regex solution, or if non-regex answers are OK too. Consistently, the asker says non-regex answers are fine too, so I edit the question so it isn't tagged regex and just asks for a general solution.
I recognise we can catch these questions early and edit them, but is there more we can do? Is there anything we can do to prevent people from asking their string-manipulation questions like this in the first place?