Name : contains matches

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Name : contains matches Wed Jul 09, 2014 11:28 am • by YannS
Hello !

Thanks for the wonderful software.

I saw for a "content' rule, you can set "contains matches" but this do not exists for a "Name" rule. Why that ?

I wanted to match a part of a name to trigger a rule but i can't like that and do it by making a python script is kind of overkill...

Do you plan of adding for "Name" rule, some options like:
- starts matches
- end matches
- contains matches
?

or more preferably a single option to rules them (three) all ? :)

Thanks,
YannS
YannS
 
Posts: 3
Joined: Wed Jul 09, 2014 11:22 am

Re: Name : contains matches Thu Jul 10, 2014 1:28 pm • by Mr_Noodle
Just use "matches". It behaves slightly differently in that the pattern you use there has to account for the whole name, not just a part of it. So, for instance, if you have "blah-123" and you only care about the number at the end, you need to also add elements to the pattern to match the first part.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Name : contains matches Sun Jul 13, 2014 9:00 am • by YannS
Works like a charm, thanks !

Didn't even think to do that... i'm just an idiot :)

Can wait to see what you will make for the future of Hazel !
YannS
 
Posts: 3
Joined: Wed Jul 09, 2014 11:22 am


Return to Open Discussion