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. NSError *error = nil;
  9. NSString *myText = @"its me";
  10. NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\b" options:NSRegularExpressionCaseInsensitive|NSRegularExpressionAnchorsMatchLines 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 0.04s 42896KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2016-04-20 12:26:07.024 prog[24469] autorelease called without pool for object (0x8b3e4c0) of class NSRegularExpression in thread <NSThread: 0x8b00800>
2016-04-20 12:26:07.025 prog[24469] "its" "me"