Quickies

[categories] [index] [all (527)] [latest]

Cocoa Foundation
  1. NSString *s = @"Hello World!";
    NSString *re = @".*l{2}.*";
    NSPredicate *p = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", re];
    
    NSLog(@"Match: %d", [p evaluateWithObject:s]);