express problem
Posted: Tue Sep 18, 2007 11:12 am
i want to check if the $var has minimum 5 characters and they are all of a-zA-Z0-9 and started with a-z but its not working.
here is my code:
any help
thank you
here is my code:
any help
Code: Select all
$regex="/^[a-zA-Z]([a-zA-Z0-9]*){5,26}$/";
$var = 'a';
if(preg_match($regex,$var))
{
echo "Hello";
}else
{
echo "yall";
}