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

Support a `[count:x]` wildcard qualifier #849

Open
xiaq opened this issue Aug 11, 2019 · 1 comment
Open

Support a `[count:x]` wildcard qualifier #849

xiaq opened this issue Aug 11, 2019 · 1 comment
Labels

Comments

@xiaq
Copy link
Member

@xiaq xiaq commented Aug 11, 2019

Should work similarly to regular expression's {n}, matching number of codepoints, with support for ranges. Examples:

  • *[count:5] matches 5 codepoints
  • *[count:5-10] matches 5 to 10 codepoints
  • *[count:5-] matches 5 or more codepoints
  • *[count:-5] matches 5 or fewer codepoints

I don't quite like the last example though, as -5 looks like negative five. It is technically unambiguous in this case, but still weird.

@xiaq

This comment has been minimized.

Copy link
Member Author

@xiaq xiaq commented Aug 11, 2019

Idea and proposed syntax courtesy of @hanche

@xiaq xiaq removed the type:enhancement label Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.