Php only supports English characters and numbers. the regular expression is $ passwordabc12; if (! Preg_match (& quot; ^ ([a-z] + [0-9] +) | ([0-9] + [a-z] + )) [a-z0-9] * $ I & quot;, $ password) {echo password must be a combination of numbers and letters;} php limit can only enter 6-15 characters and numbers, the regular expression is as follows: $ passwordabc12 php limits that only English characters and numbers can be entered. the regular expression is as follows:
$ Password = 'abc12 ';
If (! Preg_match ("/^ ([a-z] + [0-9] +) | ([0-9] + [a-z] + )) [a-z0-9] * $/I ", $ password )){
Echo 'The password must be composed of digits and letters ';
}
Php only supports 6-15 characters and numbers. the regular expression is as follows:
$ Password = 'abc123 ';
$ Plen = strlen ($ password );
If (! Preg_match ("/^ ([a-z] + [0-9] +) | ([0-9] + [a-z] + )) [a-z0-9] * $/I ", $ password) | $ plen <6 | $ plen> 15 ){
Echo 'The password must be a combination of 6-15 digits and letters ';
}