vorrei verificare che una stringa contenga numeri e lettere
Dov'è l'errore?
Codice PHP:
$string='12345678'; $regex = "/\b[a-z]+[0-9]+\b/i";
if (preg_match($regex, $string)) {
echo 'ok';
}
else echo 'errore;'
vorrei verificare che una stringa contenga numeri e lettere
Dov'è l'errore?
Codice PHP:
$string='12345678'; $regex = "/\b[a-z]+[0-9]+\b/i";
if (preg_match($regex, $string)) {
echo 'ok';
}
else echo 'errore;'