Regexp can help. As a example:
NSString *text =
@"SMART Disk Hitachi HTS545050B9SA02 (100826PBL40017J9VZTV): 32 C \n\
SMB NORTHBRIDGE CHIP DIE: 51 C \n\
SMC BATTERY: 35 C \n\
SMC BATTERY POSITION 2: 35 C \n\
SMC BATTERY POSITION 3: 32 C \n\
SMC BATTERY POSITION 4: 37 C \n\
SMC CPU A DIODE: 52 C \n\
SMC CPU A PROXIMITY: 48 C \n\
SMC LEFT PALM REST: 32 C \n\
SMC MAIN HEAT SINK 2: 48 C \n\
SMC MAIN HEAT SINK F: 48 C \n\
SMC NORTHBRIDGE POS 1: 46 C \n\
Smart Battery bq20z451 (19457): 35 C";
NSString *text_random =
@"SMB NORTHBRIDGE CHIP DIE: 51 C \n\
SMC BATTERY: 35 C \n\
SMC BATTERY POSITION 2: 35 C \n\
SMC BATTERY POSITION 3: 32 C \n\
SMC BATTERY POSITION 4: 37 C \n\
SMART Disk Hitachi HTS545050B9SA02 (100826PBL40017J9VZTV): 32 C \n\
SMC CPU A DIODE: 52 C \n\
SMC CPU A PROXIMITY: 48 C \n\
SMC LEFT PALM REST: 32 C \n\
SMC MAIN HEAT SINK 2: 48 C \n\
SMC MAIN HEAT SINK F: 48 C \n\
SMC NORTHBRIDGE POS 1: 46 C \n\
Smart Battery bq20z451 (19457): 35 C";
NSRegularExpression *regex = [NSRegularExpression
regularExpressionWithPattern:@"([^\n].*Disk.*\n+)"
options:NSRegularExpressionCaseInsensitive
error:nil];
NSTextCheckingResult *textCheckingResult = [regex firstMatchInString:text options:0 range:NSMakeRange(0, text.length)];
NSLog(@"found: '%@'", [text substringWithRange:[textCheckingResult rangeAtIndex:1]]);
textCheckingResult = [regex firstMatchInString:text_random options:0 range:NSMakeRange(0, text_random.length)];
NSLog(@"found: '%@'", [text_random substringWithRange:[textCheckingResult rangeAtIndex:1]]);