Regex for alphanumeric password, with at least 1 number and character

前端 未结 6 1959
礼貌的吻别
礼貌的吻别 2020-12-18 13:02

Need help with a regex for alphanumeric password, with at least 1 number and character, and the length must be between 8-20 characters.

I have this but doesn\'t seem

6条回答
  •  旧时难觅i
    2020-12-18 13:50

    Why not just use a handful of simple functions to check?

    checkPasswordLength( String password);
    checkPasswordNumber( String password);
    

    Maybe a few more to check for occurrences of the same character repeatedly and consecutively.

提交回复
热议问题