Need Category Formula Help

Started by banzai, May 18, 2023, 02:17:31 PM

Previous topic - Next topic

banzai

Hi there,

currently I'm maintaining keywords from AutoTagger and manual keywords for my images:
- Everything from AutoTagger is under @Keywords|#Auto
- Keywords that I manually add are under @Keywords|<something else> (Note: there's no common parent folder for manual keywords)

Now I'm trying to create a data driven Category with a formula that finds all files, that have no manual keywords.

I tried this formula:
Quote"@Unassigned"
OR
(
    "@Category[@All|^@Keywords$|^#Auto$]" 
    AND  NOT "@Category[@All|^@Keywords$|^(?!#Auto).*$]"
)
But I get an error "Invalid Expression" when testing the formula. I'm not really a regular expression expert and I just googled the negative "starts-with" match, perhaps I am doing something wrong here.

Or perhaps there's a completely different way to solve this problem?
Any hints are appreciated.

banzai

I just saw that the more easy problem "show me files that have no automatically assigned keywords" gives me the same problem with this formula:

QuoteNOT "@Category[@All|^@Keywords$|^#Auto$]"

I suspect the hash sign is the culprit, will do a test with a different character... but hashes shouldn't be special for regexes...

banzai

#2
Duh, found my problem: I should just use "NOT" instead of "AND NOT" :)

(and "@All" NOT ... for the second formula)

Mario

Quote from: banzai on May 18, 2023, 02:31:36 PMDuh, found my problem: I should just use "NOT" instead of "AND NOT" :)

(and "@All" NOT ... for the second formula)
Yep. The syntax is very precise but logical.

"@All" NOT ...

would read as "All files in the database except..."
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook