We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to build a verbal expression to match common math operators:
new VerEx().anyOf(["+", "-", "*", "/", "^"])
However, arranging the characters in this order yields the error:
Invalid regular expression: /[\+-\*/\^]/: Range out of order in character class
Any other grouping works correctly (e.g, with the - first, third, etc.):
-
new VerEx().anyOf(["-", "+", "*", "/", "^"]) // VerbalExpression /[-\+\*/\^]/gm
Only the order with the - in the second index fails. Is this a bug?
The text was updated successfully, but these errors were encountered:
Fix sanitization logic
a228f1f
Borrowed from https://github.com/sindresorhus/escape-string-regexp Fixes VerbalExpressions#352
Successfully merging a pull request may close this issue.
I'm trying to build a verbal expression to match common math operators:
However, arranging the characters in this order yields the error:
Invalid regular expression: /[\+-\*/\^]/: Range out of order in character class
Any other grouping works correctly (e.g, with the
-
first, third, etc.):Only the order with the
-
in the second index fails. Is this a bug?The text was updated successfully, but these errors were encountered: