Pattern matching for sorting needs to use "custom" tokens. That way we can group patterns, name them, and tell Hazel to sort your file in special ways.
This is what I'd do:
- Code: Select all
if (all) of the following conditions are met for the (current file or folder)
(Name) [matches] (Custom Token Matching Prefix)-(Custom Token Matching Middle)-(Custom Token Matching Suffix)
Then do the following:
(Sort into Subfolder) with pattern (Custom Token Matching Prefix)-(Custom Token Matching Suffix)
Now, in order to create these custom tokens, drag "custom •" to the naming field. A new floating window will show and you'll assign it both a name and a pattern. The name is what is showing in my example above: "Custom Token Matching Prefix", etc. You can name these different tokens whatever you want.
The pattern is more important. Your pattern of (1)(1)(1)(1)(1)(1)(1)(1) would work fine, but you could also use (123) instead, which matches a number instead of a digit. Your patterns of (...) work fine too, but it looks like the suffix is always a number and the prefix is always letters. Here, we're going to separate the patterns into the three named tokens:
Custom Token Matching Prefix = (abc)
Custom Token Matching Middle = (123)
Custom Token Matching Suffix = (123)
Then, be sure to place dashes between
prefix-middle-suffix because that helps to define the expected pattern for Hazel.
Hope this helps to clarify!