I would like to search if in the attribute description
(an NSString
instance) there is a given word.
I tried with this predicate:
[NSPredicate predicateWithFormat:@"description CONTAINS[cd] %@", theWord];
It works, but it finds also sub-words.
For example, given theWord
:
Car
it will mach also this description
:
A Christmas Carol
Instead, I would like that my predicate will match only a
, or christmas
, or carol
.
(I'm using Core Data and NSFetchRequest.)