since regular exressions are not supported in Cocoa I find RegexKitLite very usefull. But all examples extract matching strings.
I just want to test if a string matches
I've used NSPredicate for that purpose:
NSString *someRegexp = ...; NSPredicate *myTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", someRegexp]; if ([myTest evaluateWithObject: testString]){ //Matches }