RE: [PHP] ereg()

From: Date: Tue, 30 Jan 2001 02:46:02 +0000
Subject: RE: [PHP] ereg()
Groups: php.general 
Request: Send a blank email to php-general+get-37219@lists.php.net to get a copy of this message
only letters and space ? if (eregi("^[A-Z ]+$", $firstname)) this will return true only if a case-insensitive string will contain only letters and spaces... (and the string must not be NULL) if (eregi("^([A-Z]+( )*[A-Z]+)$", trim($firstname)))\ this will return "Maxim Maletsky", " Maxim Maletsky " but not "Maxim Maletsky, jr" or even "MaximMaletsky " Cheers, Maxim Maletsky -----Original Message----- From: kaab kaoutar [mailto:kaab_k@hotmail.com] Sent: Monday, January 29, 2001 7:32 PM To: php-general@lists.php.net Subject: [PHP] ereg() Hi is the following right? ereg("[a-zA-Zéêèë\sbàäïüöûâç-]", $firstname) cause even when i type a number it accepts it ! however i want only letters - and space ! thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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 (#37219) next »