I need to validate password with: At least one uppercase, at least one lowercase, at least one number OR symbol, at least 8 characters.
I have this regex:
/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,20}$/
This works fine except of > it checks string on number AND symbol, but not on number OR symbol. And also character length 8-20, not at least 8 but gives range. I want it to check number OR symbol. Any ideas? Thanks and have a good day!