What characters are invalid in keywords/categories?

Started by dnovak, October 21, 2018, 09:38:41 AM

Previous topic - Next topic

dnovak

Hello,

What characters besides '@' are discouraged in keywords and data-driven categories?  I thought I saw this in the documentation but I can't find it again.  So far, I've noticed '@' and '~' get replaced with underscores (which is fine).

Also, IMatch REALLY doesn't like the following in hierarchical keywords or data-driven categories using 'detect hierarchies':

- With only a delimiter at the beginning, e.g. "|somekeyword|some other keyword"
- Doubled-up delimiters, e.g. "akeyword||anotherkeyword"
- trailing delimiters "akeyword|yetanotherkeyword|"

These make everything slow down considerably.  I realize the answer here is "Don't do that", but I'm importing data from other sources that may not be valid.

Thanks,

Dan Novak

Mario

Category Names

Also, the | is reserved for separating hierarchies, both in categories and XMP keywords. You don't use the pipe as a part of the name or keyword.
Don't try to trick or break the system by invalid names starting with | or ending with | or using || .
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

dnovak

Thank you!  I knew I saw that in Help somewhere. 

I've been cleaning up my hierarchical keywords with the Metadata Mechanic app, not realizing my regex was wrong.  The program started inexplicably freezing and I noticed my mistake only by chance (Preview in Edit Data-Driven Category was showing a 60-level keyword at one point).

After fixing the bad keywords, everything's fine now.

I'll be much more careful with my regular expressions from now on!

Thanks again,

Dan

Mario

There is a regexp tester app which allows you to test the PERL regular expressions IMatch uses.
The MD Mechanic uses JavaScript regular expressions, which are very similar. But not in all advanced areas. You can find plenty of JavaScript regular expression testers and guide online.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook