首页 > 其他 > 详细

Regex Password Validation

时间:2017-01-26 13:15:49      阅读:480      评论:0      收藏:0      [点我收藏+]

You need to write regex that will validate a password to make sure it meets the follwing criteria:

  • At least six characters long
  • contains a lowercase letter
  • contains an uppercase letter
  • contains a number
    function validate(password) {
      return /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{6,}$/.test(password);
    }

     

Regex Password Validation

原文:http://www.cnblogs.com/bldf/p/6351509.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!