3v4l.org

run code in 200+ php & hhvm versions
<?php echo "---------------------password check----------------------- \n"; $str1="JamesBlunt32"; if(preg_match("/\A(?=\w{6,12}\z)(?=[^a-z]*[a-z])(?:[^A-Z]*[A-Z])(\D*\d.*)\z/", $str1)==1){ echo "Password valid \n"; } else echo "Password invalid \n";