How to filter array with NSPredicate for combination of words
[filteredArray filterUsingPredicate: [NSPredicate predicateWithFormat:@"self BEGINSWITH[cd] %@", searchText]]; filteredArray contains simple NSStrings. [hello, my, get, up, seven, etc...]; It will give all strings that begin with searchText . But if string will be a combination of words like "my name is", and searchText = name . What would a NSPredicate look like to achieve this? UPDATE: And how would it have to be if i want to a result with searchText = name , but not with searchText = ame ? Maybe like this: [filteredArray filterUsingPredicate: [NSPredicate predicateWithFormat: @"self