I have method that get title from url.
It works but on the one website I don't have result from match.
Have you any idea where is problem?
On the webpage is title in Test - sds
NSURL *url_s = [NSURL URLWithString:url];
NSData* data = [NSData dataWithContentsOfURL:url_s];
if(data!=nil){
NSString* newStr = [NSString stringWithUTF8String:[data bytes]];
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"<title>(.*)</title>" options:0 error:NULL];
NSTextCheckingResult *match = [regex firstMatchInString:newStr options:0 range:NSMakeRange(0, [newStr length])];
NSString *title = [newStr substringWithRange:[match rangeAtIndex:1]];
}