RE: [PHP] is_alpha_numeric ?
| From: | PHPBeginner.com | Date: | Sat, 07 Jul 2001 05:16:39 +0000 |
| Subject: | RE: [PHP] is_alpha_numeric ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56601@lists.php.net to get a copy of this message | ||
check out ctype (suggested to PHP by me, btw)
php.net/ctype
we have all that.
-Maxim Maletsky
-----Original Message-----
From: Lasse [mailto:lm@nospam.dk]
Sent: Saturday, July 07, 2001 7:40 AM
To: php-general@lists.php.net
Subject: Re: [PHP] is_alpha_numeric ?
"scott [gts]" <scott@graphictype.com> wrote in message
news:KFEKLFMNHDILCMFAEKJCKEKJCMAA.scott@graphictype.com...
> you could also use this:
>
> function is_alphanum($data) {
> return preg_match('/^\w+$/', $data);
> }
Watch out though... IIRC \w also includes underscore...
--
Lasse
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net