[英]How to find how many numbers and letters are on a string
I'm validating passwords. 我正在验证密码。 I need to check how many letters and numbers there are in a password. 我需要检查密码中有多少个字母和数字。 If there were less than 2 numbers or less than 2 letters, the user should be warned about an invalid password. 如果少于2个数字或少于2个字母,则应警告用户密码无效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.