Passwords Regex Function
//Passwords must be at least 6 characters long with one uppercase letter and one number
function strongpassword($str) { return (!pregmatch('/^(?=^.{6,}$)((?=.[A-Za-z0-9])(?=.[A-Z])(?=.[a- z]))^.$/', $str)) ? false : true; } </code> </pre>
Written by Mohamed KEITA
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Related Tags
#php
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#