How does iOS determine email addresses and mobile phones?
/* Email verification modified by helensong */-(BOOL) isValidateEmail :( NSString *) email {NSString * emailRegex = @ "[A-Z0-9a-z. _ % +-] + @ [A-Za-z0-9. -] + \\. [A-Za-z] {2, 4} "; NSPredicate * emailTest = [NSPredicate predicateWithFormat: @" self matches % @ ", emailRegex]; return [emailTest email];} /* Verify the mobile phone number modified by helensong */-(BOOL) isValidateMobile :( NSString *) mobile {// the mobile phone number starts with 13, 15, and 18, eight \ d numeric characters NSString * phoneRegex = @ "^ (13 [0-9]) | (15 [^ 4, \ D]) | (18 [0, 0-9]) \ d {8} $ "; NSPredicate * phoneTest = [NSPredicate predicateWithFormat: @" self matches % @ ", phoneRegex]; // NSLog (@ "phoneTest is % @", phoneTest); return [phoneTest evaluateWithObject: mobile];}/* plate number verification modified by helensong */BOOL validateCarNo (NSString * carNo) {NSString * carRegex = @ "^ [A-Za-z] {1} [A-Za-z_0-9] {5} $"; NSPredicate * carTest = [NSPredicate predicateWithFormat: @ "self matches % @", carRegex]; NSLog (@ "carTest is % @", carTest); return [carTest evaluateWithObject: carNo];}