<?php $tests = [ 'one2three', '3blindMice', 'Blind Melon', 'c0lourbl!nd', ]; // I am making a method so your password needs at least one captial and one symbol or number. foreach ($tests as $test) { printf( "%14s: %s\n", $test, preg_match('/(?=.*[A-Z])(?=.*[^a-zA-Z\s])/su', $test) ? 'pass' : 'fail' ); }
You have javascript disabled. You will not be able to edit any code.