It would sometimes be useful to be able to search packages that don't match the given search string. E.g. I'd like to browse https://packager.fedorainfracloud.org/orphan without anything that matches nodejs.
This is currently possible with ^((?!nodejs).)*$ but that's arguably a tad tedious to remember (I had to google it).
^((?!nodejs).)*$
Ideas for this:
!nodejs
!
NOT nodejs
NOT
I'm experimenting with pegjs and this grammar (I'm rusty in this area, but this grammar is a modification of classic textbook example for parsing arithmetic expressions):
pegjs
S -> A S -> e // empty string is accepted A -> M || A // additive operation - OR A -> M M -> F && M // multiplicative operation - AND M -> F F -> ! F // negation F -> ( A ) // parentheses F -> r/regex/ // regex match F -> string // substring match
This grammar would be more robust that what is requested in this issue and would allow search expressions like:
!python && !nodejs apache || nginx rpm && !r/^python/ (rust || golang) && !(bitbucket || github) ...
It's over the top a little, but so far working with pegjs was easy and I have working prototype already... so I guess why not.
WDYT?
Why not :)
This feature is now deployed.
Looks nice. Suggestions:
deployed
Metadata Update from @lbrabec: - Issue status updated to: Closed (was: Open)
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/apps/packager_dashboard/issues/73
Please continue any further discussion there.