0

I am working on an expression for a password, where the validation should contain

  1. must contains letters with numbers or symbols( NOT letters, numbers and symbols)
  2. Uppercase or Lowercase( NOT a combination of both)
  3. Min length of password is 8

based on the inputs provided by Mena, i have updated my expression to

String patternChar = "^[a-z&&[^A-Z]]+|[A-Z&&[^a-z]]+$";
String patternNumber = "^[a-zA-Z0-9&&[\\S]]+|[a-zA-Z\\S&&[^0-9]]+$";
  1. PatternChar works fine for only Upper or Lower Case.
  2. PatternNumber does work if i combine PatternChar with numbers or symbols.

here symbol means all UTF8 or unicode characters like e.g. £$%^

Thanks for your help.

but has problems.

Regards Ram

A4L
  • 17,353
  • 6
  • 49
  • 70
RamRapolu
  • 1
  • 5

0 Answers0