I need to match my string in this way: *myString*
where *
mean any substring.
which method should I use?
can you help me, please?
If it's for iPhone OS 3.2 or later, use NSRegularExpressionSearch.
NSString *regEx = [NSString stringWithFormat:@".*%@.*", yourSearchString];
NSRange range = [stringToSearch rangeOfString:regEx options:NSRegularExpressionSearch];
if (range.location != NSNotFound) {
}