This is a discussion on Re: [PHP] Regular Expression within the PHP General forums, part of the PHP Programming Forums category; On Tue, Jul 08, 2003 at 06:47:26AM -0500, Wendell Brown wrote: > > I think this would do ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|