-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegExp._escape #11
Comments
What would someone be trying to achieve with the "Bad Usage" pattern? |
That's the question of the decade isn't it... tc39/proposal-regex-escaping#37 (comment) |
So someone might use the |
It doesn't make any sense. I couldn't find any explanation of "the even/odd problem", just a reference to it. I'll summarize it here as well: You'd have to be stupid to do that. Obviously if you only use an escape on part of your string, only part of your string is escaped. If you use I can't explain it better because it's literally nonsense, which is what everyone is so upset about. |
(seriously, don't dig too deep trying to understand it, it's lost cause - someone just made up a bad use case and I'm quoting it here not because it would ever make sense, but just to document exactly what was shown to be an invalid use) |
Implementation
Good Usage:
Bad Usage:
Unlikely to ever be accepted into ECMAScript. See:
The text was updated successfully, but these errors were encountered: