NSString *str = [NSString alloc]init];
str = @"1234567890";
NSRange r ;
r = [str rangeOfString : textview.text];
if(r.location != NSNotFound){
NSLog(@"found at location = %d, length = %d",r.location, r.length);
}
else
{
NSLog(@"not found");
}