Fix project and add a RegexKitLite method replacement.
This commit is contained in:
1 parent
5804cd49f3
commit
68bcb15b50
3 files changed
+19
-12
No files matched your search
@@ -53,4 +53,10 @@
|
||||
return ([r matchesInString:self options:0 range:NSMakeRange(0, self.length)].count) > 0;
|
||||
}
|
||||
|
||||
- (NSString *)MP42_stringByMatching:(NSString *)regex capture:(NSInteger)capture {
|
||||
NSRegularExpression *r = [NSRegularExpression regularExpressionWithPattern:regex options:0 error:NULL];
|
||||
NSTextCheckingResult *match = [r firstMatchInString:self options:0 range:NSMakeRange(0, self.length)];
|
||||
return [self substringWithRange:[match rangeAtIndex:capture]];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user