I want regex with following conditions,
- there should be at-least one character or number in the string.
- combination may contain special characters like !@#$%&*.
- string length should be more than 7.
Eg.
- test1234
- test@1234
- 1234Test
Thanks in advance. here my code
NSPredicate *regex = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"^(?[0-9])(?[a-zA-Z]){7,}$"];
BOOL isvalid = [regex evaluateWithObject:string];
sorry i couldn't find regex which i used before.