fork 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. NSError *error = nil;
  9. NSString *myText = @"abc 123 x";
  10. NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\D+" options:nil error:&error];
  11. NSString *modifiedString = [regex stringByReplacingMatchesInString:myText options:0 range:NSMakeRange(0, [myText length]) withTemplate:@""];
  12. NSLog(@"%@", modifiedString);
  13. return 0;
  14. }
  15. @end
Success #stdin #stdout #stderr 0s 131712KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2017-11-03 20:24:30.408 prog[22820:22820] autorelease called without pool for object (0x2b826ae69980) of class NSRegularExpression in thread <NSThread: 0x2b826ae6c880>{name = (null), num = 22820}
2017-11-03 20:24:30.454 prog[22820:22820] autorelease called without pool for object (0x2b826af9f6c0) of class NSCalendarDate in thread <NSThread: 0x2b826ae6c880>{name = (null), num = 22820}
2017-11-03 20:24:30.454 prog[22820:22820] autorelease called without pool for object (0x2b826b07de50) of class GSDictionary in thread <NSThread: 0x2b826ae6c880>{name = (null), num = 22820}
2017-11-03 20:24:30.454 prog[22820:22820] autorelease called without pool for object (0x2b826b08a1d0) of class GSTimeZone in thread <NSThread: 0x2b826ae6c880>{name = (null), num = 22820}
2017-11-03 20:24:30.454 prog[22820:22820] autorelease called without pool for object (0x2b826af9a150) of class GSCInlineString in thread <NSThread: 0x2b826ae6c880>{name = (null), num = 22820}
2017-11-03 20:24:30.454 prog[22820:22820] autorelease called without pool for object (0x2b826b0882a0) of class NSDataMalloc in thread <NSThread: 0x2b826ae6c880>{name = (null), num = 22820}
2017-11-03 20:24:30.454 prog[22820:22820] 123