i have a regexp for password validation ( Regexp Java for password validation with extra special characters)
String pattern ="^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=!\\*_?|~(){}/<>:\"\',\\[\\]`;\\\\\\\\-])(?=\\S+$).{8,}$";
The issue with this is, if i say
"Xyz.123".matches(pattern);
This returns false
However, if i say
"Xyz.123$".matches(pattern);
This returns true
'.' is not a valid special characters in my case. But if my password has a valid special character along with '.' it returns true