I am trying to write a regular expression to handle phone number which starts with \"0\" followed by \"9\" and 9 digits which can be anything within 0-9.
-(BOOL)
Using a NSString method:
NSString
- (BOOL)validateAlphabets: (NSString *)text { NSString *regEx = @"09\\d{9}"; NSRange range = [text rangeOfString:regEx options:NSRegularExpressionSearch]; return range.location != NSNotFound; }