My code is below,but it doesn't work.
NSString *regex = @"^#";
NSPredicate *regextest = [NSPredicate
predicateWithFormat:@"SELF MATCHES %@", regex];
if ([regextest evaluateWithObject:secondHalfString] == YES) {
NSLog(@"Match!");
} else {
NSLog(@"No match!");
}
Anything wrong?