NSPredicate and simple Regular Expression problem
- by rjstelling
I'm having problems with simple NSPredicates and regular expressions:
NSString *mystring = @"file://questions/123456789/desc-text-here";
NSString *regex = @"file://questions+";
NSPredicate *regextest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
BOOL isMatch = [regextest evaluateWithObject:mystring];
In the above example isMatch is is always false/NO.
What am I missing? I can't seem to find a regular expression that will match file://questions.