Hey I'm getting a very in-descriptive REG_BADRPT error on the following line:
if(ereg('(?=^.{8,20}$)((?=.*\d)|(?=.*\W+))(?![.
])(?=.*[A-Z])(?=.*[a-z]).*$', $_POST['password']))
Can anyone see what the problem is?
I've used the same regex in javascript and it works fine so not sure what the problem is here.
What I'm trying to achieve here is set a regex that would validate strings that contain:
- At least one lower case letter
- At least one upper case letter
- At least one number or symbol
- and should be between 8 and 20 characters long