I need to write a check which goes like this:
inputs: userName, password
output: boolean true/false
password should not contain 3 consecutive characters in an userName.
For example, if username = "abcd1" then password should not contain consecutive string in it like "abc" or "bcd" or "cd1".
So, if password="xyzabc" then it is not acceptable.
This can be done in many ways but I am looking for a regex for the same.
Please suggest a regex which can take care of this.
Thanks in advance.
inputs: userName, password
output: boolean true/false
password should not contain 3 consecutive characters in an userName.
For example, if username = "abcd1" then password should not contain consecutive string in it like "abc" or "bcd" or "cd1".
So, if password="xyzabc" then it is not acceptable.
This can be done in many ways but I am looking for a regex for the same.
Please suggest a regex which can take care of this.
Thanks in advance.