Home > front end >  Regular expression test whether a string is a valid password
Regular expression test whether a string is a valid password

Time:10-26

Requirements:
(1) the password must be at least eight characters,
(2) the password can only contain letters and Numbers,
(3) the password must contain at least two Numbers,

CodePudding user response:

refer to the building of large data private senior response:
requirement:
(1) the password must be at least eight characters,
(2) the password can only contain letters and Numbers,
(3) the password must contain at least two Numbers,

Which bosses would, in the

CodePudding user response:

 
Var STR="as2d4fre";
Alert (/^ (? )=(. * \ d {2}) [a-z \ d] {8} $/i.t est (STR));
  • Related