Objective-C LanguageNSRegularExpression


Syntax

  • NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:PATTERN options:OPTIONS error:ERROR];
  • NSArray<NSTextCheckingResult *> *results = [regex matchesInString:STRING options:OPTIONS range:RANGE_IN_STRING];
  • NSInteger numberOfMatches = [regex numberOfMatchesInString:STRING options:OPTIONS range:RANGE_IN_STRING];