Regular Expression

From: Date: Tue, 08 Jul 2003 04:59:23 +0000
Subject: Regular Expression
Groups: php.general 
Request: Send a blank email to php-general+get-154306@lists.php.net to get a copy of this message
I have a form where I have to check whether user is submitting a PO Box as an address. I wrote the following using eregi, but it returns true even when the field is not Po Box. How do I go about doing this properly? if(eregi("^Po Box$", $address)){ $error_message_custom = "You cannot use a PO BOX for Bill To Address"; }

« previous php.general (#154306) next »