fork(1) download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3. #import <Foundation/Foundation.h>
  4.  
  5. @implementation TestObj
  6. int main()
  7. {
  8. NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  9. NSString * nickNameTF = @"0 1";
  10. NSString * emailRegex = @"\\d\\u0009\\d";
  11. // \\u0009 is passed as \u0009 to ICU regex engine, matches a tab
  12. NSPredicate * emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];
  13. if ([emailTest evaluateWithObject:nickNameTF]) {
  14. NSLog (@"yes");
  15. }
  16. else
  17. {
  18. NSLog (@"no");
  19. }
  20.  
  21. [pool drain];
  22. return 0;
  23. }
  24. @end
Success #stdin #stdout #stderr 0.01s 130816KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2018-11-19 09:17:25.999 prog[10176:10176] yes