fork(2) download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3. #import <Foundation/Foundation.h>
  4.  
  5. int main()
  6. {
  7.  
  8. NSString * URL_Query = @"PAS.S.1-23-";
  9. NSString * regex = @"[a-zA-Z0-9.-]+";
  10. NSPredicate *regexTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
  11. BOOL valid = [regexTest evaluateWithObject:URL_Query];
  12. valid ? NSLog (@"yes") : NSLog (@"no");
  13. return 0;
  14. }
  15.  
Success #stdin #stdout #stderr 0.02s 42792KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2016-11-18 12:32:51.795 prog[10055] autorelease called without pool for object (0xa00c6c8) of class GSMutableArray in thread <NSThread: 0x9fce908>
2016-11-18 12:32:51.795 prog[10055] autorelease called without pool for object (0xa05d4f8) of class GSArrayEnumerator in thread <NSThread: 0x9fce908>
2016-11-18 12:32:51.796 prog[10055] autorelease called without pool for object (0xa0577f8) of class GSConstantValueExpression in thread <NSThread: 0x9fce908>
2016-11-18 12:32:51.796 prog[10055] autorelease called without pool for object (0xa060c08) of class NSComparisonPredicate in thread <NSThread: 0x9fce908>
2016-11-18 12:32:51.798 prog[10055] yes