RE: [PHP] Regular Expressions?

From: Date: Fri, 20 Apr 2001 16:26:36 +0000
Subject: RE: [PHP] Regular Expressions?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49580@lists.php.net to get a copy of this message
Maybe I'm wrong on this, but could this regex also be used like this? if(eregi("^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$", $myArray[x])) --Chris -----Original Message----- From: Jason Caldwell [mailto:jason@thinkingman.org] Sent: Friday, April 20, 2001 1:43 AM To: php-general@lists.php.net Subject: [PHP] Regular Expressions? I'm looking to compare if my array values match any digits or alpha characters with a dot between them... so, if I think I understand Regular Expressions (from what I could gather from PHP.net and Core PHP Programming by Leon Atkinson.) I want to match any of the following: 1.1 or a.a or 1111.1111 or aaaa.aaaa <-- any number of digits (0-9) or alpha (a-z) on either side of the dot. if(eregi("^([0-9][a-z]\.[0-9][a-z]", $myArray[x])) Is this correct? I think I'm missing something. Thanks. Jason -- 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 (#49580) next »