Disclaimer: I have a stake in this question, as I'm the owner of the accepted answer.
I'm disappointed with the process that's happening on this question about a regex-related error message in TypeScript, and I'd like some input:
Category shorthand not allowed in this regular expression dialect in Typescript
The OP is getting a very specific error message about his regex, but he doesn't understand how to fix it. The solution is relatively simple: Use supported syntax instead.
1st closure: Now, this question was first Dupe-hammered as a duplicate of:
That dupe target is just a broad canonical about how character classes work in JavaScript.
Imho, that dupe target was a poor fit, as it doesn't even mention the invalid shorthand syntax. I've stated as much in a comment to the original close-voter, but they chose to ignore that.
After that, the question was re-opened as a result of my re-open vote, and another gold badge owner's vote.
2nd closure: After that, the question was closed as a duplicate, again. This time targeting:
That target is once again not asking the same question, nor does it mention the error message or the regex shorthand the OP is using in the question or any of the answers...
Now, what triggered me to finally ask this on Meta, was the fact that this question has gotten a delete vote.
To me, it feels like this is "just another regex question to be deleted on sight".
We don't delete duplicates, and this question isn't exactly bad.
It's not a "Write my regex for me / debug my regex" question.
It has a clear error message.
That exact error message does not return any search results other than that question, even though it's not compiler/IDE-specific. Apparently it's not often experienced.
Sure, the question is simple, but it's specific.
Now, if someone finds a dupe that takes care of explaining why that error message is shown, or why that shorthand is invalid, I'd fully support the closure, but I ask you this:
- Should this question be closed with such a generic dupe?
- Should this question be deleted, if closed as a dupe?