Skip to content

Support negation of pattern - #67

Closed
torkel-hoge wants to merge 5 commits into
gobwas:masterfrom
torkel-hoge:not-anyof
Closed

Support negation of pattern#67
torkel-hoge wants to merge 5 commits into
gobwas:masterfrom
torkel-hoge:not-anyof

Conversation

@torkel-hoge

@torkel-hoge torkel-hoge commented Dec 23, 2025

Copy link
Copy Markdown

This PR adds new syntax which allows to negate the pattern or its part. It extends current AnyOf's syntax with ! char. For example, {!foo,bar} pattern will match baz string and will not match foo and bar. See more complicated examples in glob_test.go.

This seems to resolve the #47.

Feel free to request changes in the code and more test cases.

@torkel-hoge

Copy link
Copy Markdown
Author

@gobwas hey, is there any chance that this change will be accepted or at least reviewed?
I see that the project is not actively maintained, but still it's actively used by our project Runtime Radar and we'd be glad if the new syntax is added.

@gobwas

gobwas commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Thanks for the work, but this is against the pre-v1 code that #73 replaced, and I don't want to add negation in this form -- see #47. If negation comes, it'll be as extglob's !(...) under #3. Closing.

@gobwas gobwas closed this Aug 17, 2026
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

Successfully merging this pull request may close these issues.

2 participants