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. NSString * s = @"e3Df";
  9. NSString * rx = @"\\A(?=\\D*\\d)(?=[^A-Z]*[A-Z][^A-Z]*\\z)[A-Za-z\\d]{4}\\z";
  10. NSPredicate * predicat = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", rx];
  11. if ([predicat evaluateWithObject:s]) {
  12. NSLog (@"yes");
  13. }
  14. else
  15. {
  16. NSLog (@"no");
  17. }
  18. return 0;
  19. }
  20. @end
Success #stdin #stdout #stderr 0.03s 42848KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2015-11-16 12:27:07.796 prog[25789] autorelease called without pool for object (0x81855d0) of class GSMutableArray in thread <NSThread: 0x8147800>
2015-11-16 12:27:07.798 prog[25789] autorelease called without pool for object (0x81b4448) of class GSArrayEnumerator in thread <NSThread: 0x8147800>
2015-11-16 12:27:07.798 prog[25789] autorelease called without pool for object (0x81d5f58) of class GSConstantValueExpression in thread <NSThread: 0x8147800>
2015-11-16 12:27:07.798 prog[25789] autorelease called without pool for object (0x8193e88) of class NSComparisonPredicate in thread <NSThread: 0x8147800>
2015-11-16 12:27:07.814 prog[25789] yes