document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // Without this library
  2. NSString* string = @"I have 2 dogs.";
  3. NSRegularExpression *regex = [NSRegularExpression regular ExpressionWithPattern:@"\\\\d+" options:NSRegularExpressionCaseInsensitive error:&error];
  4. NSTextCheckingResult *match = [regex firstMatchInString:string options:0 range:NSMakeRange(0, [string length])];
  5. BOOL isMatch = match != nil;
  6.  
  7. // With this library
  8. BOOL isMatch = [@"I have 2 dogs." isMatch:RX(@"\\\\d+")];
');