Don't like ads? PRO users don't see any ads ;-)
Guest

case http:

By: a guest on Apr 17th, 2012  |  syntax: Objective C  |  size: 0.60 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. - (void)openSiteFeeds:(NSString *)stringURL{
  2.     NSError *error = NULL;
  3.     NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"http:\\\\*" options:NSRegularExpressionCaseInsensitive error:&error];
  4.     NSUInteger numberOfMatches = [regex numberOfMatchesInString:stringURL options:0 range:NSMakeRange(0, [stringURL length])];
  5.     NSLog(@"%@ %d", error, numberOfMatches);
  6.    
  7.     NSString *stringRightURL;
  8.     if (0 == numberOfMatches) {
  9.         stringRightURL  = [NSString stringWithFormat:@"http:\\@%",stringURL];
  10.     }else{
  11.         stringRightURL  = stringURL;
  12.     }