Searching how to write an "excluding" token

I am trying to set up a class that would be “all lowercase letters ending with .init or .isol that is not part of the group @e

How could I remove all the letters from the group @e from this class:
@high=[$[category like "Letter" && case==lower && name endswith ".init"] $[category like "Letter" && case==lower && name endswith ".isol"]];

This should work:

@high = $[
  (category like "Letter" && case==lower && (
    name endswith ".init" || name endswith ".isol"
  ))
  && NOT name in class(e)
];
3 Likes

Thanks a lot! It worked except for class(e) that created an error, so I had to bypass that with this:

@high=[$[(category like “Letter” && case==lower && (name endswith “.init” OR name endswith “.isol”)) && NOT name beginswith “e”]];

The class @e must be defined before the class @high for the name in class(e) code to work.

That is what I did :slight_smile:

maybe because the class @e was repeating a lot from the class high?

The class(…) code only works when the imported class is a fixed list of glyph names and does not contain tokens itself.

Instead, you can copy the token code from @e into the token code of @high.

Ah that’s explains it.
Yeah, at the end that is what I did, but simpler since there were some repetition.
Thanks for the info!