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
Use the -isMatchedByRegex: method.
if([someString isMatchedByRegex:@"^[0-9a-fA-F]+:"] == YES) { NSLog(@"Matched!\n"); }