0

I have three rules for password creation.

1.At least 8 characters 2.An upper and lower case letter 3.At least one number or one of the following ! # $ % & * @ \

I created three regular expression like this:

final _eightCharacterValidation = RegExp('(.{8,})');
final _caseValidation = RegExp('(?=.*[a-z])(?=.*[A-Z])');
final _numberOrSpecialCharacterValidation = RegExp('((?=.*\\d)|(?=.*[!#\$%&*@]))');

Can any one help me how to use a single regex and group matching (named groups) to determine what criteria have been met?

kartheeki j
  • 2,002
  • 4
  • 24
  • 49

0 Answers0