Re: Regular expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2:04 AM -0500 12/12/07, Robert Cummings wrote:
<?php

if( strlen( $pw1 ) < 6
    ||
    !ereg( '[[:digit:]]', $pw1 )
    ||
    strlen( ereg_replace( '[^[:alpha:]]', '', $pw1 ) ) < 2
    ||
    strlen( ereg_replace( '[[:alnum:][:space:]]', '', $pw1 ) ) < 1 )
{
    // error message
}

?>

Cheers,
Rob.

Rob:

You are a never ending supply for great snip-its!

Thanks,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux