We have password requirements:
- Must contain capital letters
- Must contain lowercase letters
- Must contain numbers
- Must contain special characters
- There should be no characters repeating one after another
Now our validation regex is:
^((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%&*]))
So it doesn't validating the 5th requirement.
How to improve regex to validate characters repeating?