
case http:
By: a guest on
Apr 17th, 2012 | syntax:
Objective C | size: 0.60 KB | hits: 20 | expires: Never
- (void)openSiteFeeds:(NSString *)stringURL{
NSError *error = NULL;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"http:\\\\*" options:NSRegularExpressionCaseInsensitive error:&error];
NSUInteger numberOfMatches = [regex numberOfMatchesInString:stringURL options:0 range:NSMakeRange(0, [stringURL length])];
NSLog(@"%@ %d", error, numberOfMatches);
NSString *stringRightURL;
if (0 == numberOfMatches) {
stringRightURL = [NSString stringWithFormat:@"http:\\@%",stringURL];
}else{
stringRightURL = stringURL;
}