Skip to content

Instantly share code, notes, and snippets.

@sash13
Created November 12, 2009 18:24
Show Gist options
  • Save sash13/233138 to your computer and use it in GitHub Desktop.
Save sash13/233138 to your computer and use it in GitHub Desktop.
NSArray *words = [content componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
NSEnumerator *en = [words objectEnumerator];
NSString *word;
NSMutableArray *ssl = [[NSMutableArray alloc] initWithCapacity:1];
while(word = [en nextObject])
{
if([word hasPrefix:@"http://"])
{
NSLog(@"%@",word);
[ssl addObject:word];
}
}
NSString *match = [ssl objectAtIndex:0];
NSLog(@"info:%@ link:%@",contenti,match);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment