RE: [PHP] RegExp Problem
| From: | Maxim Maletsky | Date: | Wed, 18 Oct 2000 08:26:31 +0000 |
| Subject: | RE: [PHP] RegExp Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20838@lists.php.net to get a copy of this message | ||
if(!eregi("^[_a-z0-9]+$", $var))
echo 'rejected';
Just a scratch...
-----Original Message-----
From: Mukul Sabharwal [mailto:phpguru@yahoo.com]
Sent: Wednesday, October 18, 2000 5:18 PM
To: php-general@lists.php.net
Subject: [PHP] RegExp Problem
Hi,
I want to do the following :
a variable with the following values to be accepted
...
if $variable contains
(1) numbers
(2) underscores
(3) letters
to be approved and anything else to be disapproved..
how do i do this....
I would like to use pcre for this (preferably) but
ereg would also do....
thanks...
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
--
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