human-regex icon indicating copy to clipboard operation
human-regex copied to clipboard

[FEATURE] anyOf() and notAnyOf()

Open tmlmt opened this issue 3 months ago • 2 comments

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 the notRange() method whose name is confusing as it not the opposite of range() 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

tmlmt avatar Aug 29 '25 10:08 tmlmt

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.

pwall2222 avatar Aug 30 '25 17:08 pwall2222

Would the opposite of anyOf be noneOf?

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

tmlmt avatar Aug 30 '25 19:08 tmlmt