I am using RegexKitLite in my iOS app and I need to do validation on a form for a password textfield. The rule I am going by is that the password should include at least one number, one uppercase letter, and two symbols. Could someone help me out with this? This is what I've found on the internet and tried (it doesn't work, of course):
if([password.text isMatchedByRegex:@"^(?=.*[0-9])(?=.*[A-Z])(?=.*\d)(?=.*[_\W]{2,}).+$"]) {
// do stuff
}