I want to scan this string
"hello I am emp 1313 object of string class 123" so in this I want to know if their are any integer value present and if present I want to display them for this I am using the NSScanner class and heres a view of my code
NSString *str = @" hello I am emp 1313 object of string class 123"; NSString *limit = @" object"; NSScanner *scanner = [NSScanner scannerWithString:str]; int i; [scanner scanInt:&i]; NSString *output; [scanner scanUpToString:limit intoString:&output]; NSLog(@"%d",i); but the problem is that I am not able to do it and I want to use NSScanner class only so can you experts give me some suggesstions regarding this.....