mostafatalebi Posted March 10, 2013 Share Posted March 10, 2013 Hello I need a regexp for best password stength. I have seen on the net, but they don't need my requirements. I need the regexp to have the following criteria: It only account for passwords with more than 14 characters. ONLY and ONLY passwords that have blank space (\s) in them. surely there has to be: sign, UPPERCASE, LOWERCASE and number. I have regexp for all strength level bad, weak, good, not enough and I ONLY need regexp for strength level "best". Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/275456-regexp-for-best-password-strength/ Share on other sites More sharing options...
.josh Posted March 10, 2013 Share Posted March 10, 2013 It's okay to dupe stuff like this to javascript as a convenience to save on server calls but unless you enforce it server-side then you have already failed. Also, we aren't here to just give you free stuff, we're here to help you learn. If you don't understand how to do what you asked for, what makes you so sure what you already have works as intended? Post what you've actually tried. Quote Link to comment https://forums.phpfreaks.com/topic/275456-regexp-for-best-password-strength/#findComment-1417843 Share on other sites More sharing options...
mostafatalebi Posted March 10, 2013 Author Share Posted March 10, 2013 /^((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s))$/ Quote Link to comment https://forums.phpfreaks.com/topic/275456-regexp-for-best-password-strength/#findComment-1417845 Share on other sites More sharing options...
OleKh Posted March 10, 2013 Share Posted March 10, 2013 1 - #^.{14, }$# // passwords with more than 14 characters 2 - #^[^\s]*\s{1}[^\s]*$# // ONLY and ONLY passwords that have blank space (\s) in them. Quote Link to comment https://forums.phpfreaks.com/topic/275456-regexp-for-best-password-strength/#findComment-1417847 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.