fork(1) download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3. #import <Foundation/Foundation.h>
  4.  
  5. int main()
  6. {
  7. NSString * s = @"abcśął";
  8. NSString * rx = @"\\w+";
  9. NSPredicate * rxTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", rx];
  10. if ([rxTest evaluateWithObject:s]) {
  11. NSLog (@"yes");
  12. }
  13. else
  14. {
  15. NSLog (@"no");
  16. }
  17. return 0;
  18. }
  19.  
  20.  
Success #stdin #stdout #stderr 0.01s 42792KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2016-09-13 13:44:08.736 prog[8432] autorelease called without pool for object (0x9fd36c8) of class GSMutableArray in thread <NSThread: 0x9f95908>
2016-09-13 13:44:08.737 prog[8432] autorelease called without pool for object (0xa024520) of class GSArrayEnumerator in thread <NSThread: 0x9f95908>
2016-09-13 13:44:08.737 prog[8432] autorelease called without pool for object (0xa01e820) of class GSConstantValueExpression in thread <NSThread: 0x9f95908>
2016-09-13 13:44:08.737 prog[8432] autorelease called without pool for object (0xa027c00) of class NSComparisonPredicate in thread <NSThread: 0x9f95908>
2016-09-13 13:44:08.739 prog[8432] yes