I am working on an iOS project where I am using a custom search bar. I am stuck at a point where I want to be able to search for a text like 093-003 even if I type in 093003 or 093 003 in the search bar.
This is where I am comparing the strings.
NSArray *tempAccountArray = _searchBarText.length > 0 ?
[[WBCBusinessLogic sharedInstance].internalAccountsArray
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"displayName CONTAINS[cd] %@ || displayNumber LIKE %@", _searchBarText, _searchBarText]]:
[WBCBusinessLogic sharedInstance].internalAccountsArray;