Better HN
topnewbestaskshowjobs
Log inSign up

cm_richards

1 karma · joined May 11, 2012 (14y ago) · 1 submissions

Submissions

comment 14y ago · link · parent

Ruby :

"The limits of my language define the limits of my world" if string =~ /foobar(\d\w)/#

Objective-C :

  NSError *error = NULL;
  NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"foobar(\\d*\\w)"
  options:NSRegularExpressionCaseInsensitive error:&error];
  NSTextCheckingResult *match = [regex firstMatchInString:string
                                                options:0
                                                   range:NSMakeRange(0, [string length])];
  if (match) {
    NSLog(@"The limits of my language define the limits of my world - Wittgenstein")
  }
Enough said?