human-regex
human-regex copied to clipboard
[FEATURE] anyOf() and notAnyOf()
Is your feature request related to a problem?
- At the moment, it is not possible to specify a custom range e.g.
[aeiou] - Only a custom exclusion range is possible, e.g.
[^aeiou]via thenotRange()method whose name is confusing as it not the opposite ofrange()which takes a range preset as input
Describe the solution
- Separate range() and anyOf() methods
- Corresponding notRange() and notAnyOf() methods
Describe alternatives None
Acceptance Criteria List requirements for feature completion:
- [x] New tests passing
Would the opposite of anyOf be noneOf? It popped into my head but it might make things more confusing, and it honestly it just might be bikeshedding.
I agree with the sentiment of this issue.
Would the opposite of
anyOfbenoneOf?
Haha good point, it was just to mirror the notRange() and have a coherent naming of opposites. At least that's the approach I took for my PR #24