Skip to content
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

Composite character ranges #85

Open
dazinator opened this issue Feb 26, 2021 · 0 comments
Open

Composite character ranges #85

dazinator opened this issue Feb 26, 2021 · 0 comments

Comments

@dazinator
Copy link
Owner

dazinator commented Feb 26, 2021

At the moment dotnet.glob supports either number or letter ranges in patterns, e.g

  • [A-Z]
  • [1-9]

However the Unix etc glob library supports a composite form of range expression:

[A-Fa-f0-9]

Ranges

   There is one special convention: two characters separated by '-'
   denote a range.  (Thus, "[A-Fa-f0-9]" is equivalent to
   "[ABCDEFabcdef0123456789]".)  One may include '-' in its literal
   meaning by making it the first or last character between the
   brackets.  (Thus, "[]-]" matches just the two characters ']' and
   '-', and "[--0]" matches the three characters '-', '.', '0',
   since '/' cannot be matched.)

Support for this could be implemented, and as far as I can see it wouldn't introduce any breaking behavioural changes as people don't have to use this pattern. I would perhaps implement new range tokens for this extended form

@dazinator dazinator changed the title Extend character ranges Composite character ranges Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant