RE: [PHP] RegExp Problem

From: Date: Wed, 18 Oct 2000 08:28:24 +0000
Subject: RE: [PHP] RegExp Problem
Groups: php.general 
Request: Send a blank email to php-general+get-20839@lists.php.net to get a copy of this message
Sorry, it should be in ().. if(!eregi("(^([_a-z0-9])+$)", $var)) echo 'rejected'; -----Original Message----- From: Maxim Maletsky Sent: Wednesday, October 18, 2000 5:27 PM To: 'mukulsabharwal@yahoo.com' Cc: 'PHP General List. (E-mail)' Subject: RE: [PHP] RegExp Problem 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

« previous php.general (#20839) next »