note 33388 deleted from function.ereg by kennyt
| From: | kennyt@php.net | Date: | Wed, 26 Jan 2005 03:48:00 +0000 |
| Subject: | note 33388 deleted from function.ereg by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83962@lists.php.net to get a copy of this message | ||
Note Submitter: christo at gacse dot com
----
I just use one of the example that someone put above and as I'm a newbie guy, I was trying to
find out a way to validate a password, and alphanumeric field wich have only alphanumeric chars, and
not spaces, I tried too many things before I get to this.
$var_to_validate = "123--45";
If (ereg('^([a-zA-Z0-9@*#]{8,15})$', $var_to_validate))
{
echo "Valid var";
}
else
{
echo "Not valid var";
}
?>
I post this 'cause this is what I was lookin for when I just came here, so I hope this can help
to anyone.