<html> <head> <title>Expression régulière</title> </head> <body> <?php $password = "bac200"; if (! preg_match ("/[[:alnum:]]{8,10}/", $password)) print "Mot de passe trop court."; else print "Mot de passe validé"; ?> </body> </html>
<html> <head> <title>Expression régulière</title> </head> <body> <?php $password = "bac200"; if (! preg_match ("/[[:alnum:]]{8,10}/", $password)) print "Mot de passe trop court."; else print "Mot de passe validé"; ?> </body> </html>