Page 1 of 1

Name contains exact match (India but not Indiana)

PostPosted: Fri Jan 12, 2018 4:43 pm
by Anjadekar
I would like to make a rule for all files that have the word India in their name and tag them Red. I set one up with the condition Name contains India but this also matches files with the word Indiana. How do I set things up so that the exact word India matches but not Indiana?

Re: Name contains exact match (India but not Indiana)

PostPosted: Sun Jan 14, 2018 3:53 pm
by KevinC
I'd suggest a rule as follows:

If all of the following conditions are met:
Name - contains - India
Name - does not contain - Indiana

This would still fail (ie positively match where you may not want a match) for files where the name contains "Indian", "Indians" etc

Re: Name contains exact match (India but not Indiana)

PostPosted: Mon Jan 15, 2018 11:11 am
by Mr_Noodle
How does the word "India" appear? Like is there always a space afterwards? Or maybe some sort of punctuation?

Re: Name contains exact match (India but not Indiana)

PostPosted: Tue Jan 16, 2018 2:46 am
by Anjadekar
Mr_Noodle wrote:How does the word "India" appear? Like is there always a space afterwards? Or maybe some sort of punctuation?


Not always. I thought of including a space before and after but I guess it wouldn't work for instances when the files is beginning with the word?

Re: Name contains exact match (India but not Indiana)

PostPosted: Tue Jan 16, 2018 3:10 am
by Anjadekar
KevinC wrote:I'd suggest a rule as follows:

If all of the following conditions are met:
Name - contains - India
Name - does not contain - Indiana

This would still fail (ie positively match where you may not want a match) for files where the name contains "Indian", "Indians" etc


Thanks for that, Kevin, but I think it might get a little cumbersome to accommodate all the potential conflicts in the Does not contain condition.

Re: Name contains exact match (India but not Indiana)

PostPosted: Tue Jan 16, 2018 10:52 am
by Mr_Noodle
Can you give examples of filenames in this case? Especially ones with non-spaces or non-punctuation after the word in question?