I am using RegexKitLite, i want to validate that my uitextfield has + prefixed and contains numeric length of 13 or only 13 numeric values.
Please let me know
Below is the code i tried
textview.text = @"123458kdkmfmdfmsdf"
NSString *regEx = @"{3}-[0-9]{3}-[0-9]{4}";
NSString *match = [textView.text stringByMatching:regEx];
if ([match isEqual:@""] == NO)
{ NSLog(@"Phone number is %@", match); }
else { NSLog(@"Not found."); }
the ouput i want is belo
ouput 1 = “1234567891012”
or output 2 can be like “+1234567891012
try this :