Re: Regular Expression

From: Date: Tue, 08 Jul 2003 18:39:04 +0000
Subject: Re: Regular Expression
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-154419@lists.php.net to get a copy of this message
On Tue, Jul 08, 2003 at 06:47:26AM -0500, Wendell Brown wrote: > > I think this would do better... > > if( preg_match( "/P[\. ]*O\.* +BOX/i", $address ) ) Unless preg_match does something non-standard, you don't need to escape a period that's inside square brackets. In fact, the regexp you've built will also match an $address of "p\o box". -- Paul Chvostek <paul@it.ca> it.canada http://www.it.ca/ Free PHP web hosting! http://www.it.ca/web/

« previous php.general (#154419) next »