Ver original$regex = '#^[a-z]*[0-9][a-z0-9]*$#i';if((preg_match($regex, $variable))==1){ echo "ok";}else{ echo "error";}