Re: mailing address regexp

From: Date: Tue, 09 Apr 2002 18:48:34 +0000
Subject: Re: mailing address regexp
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92282@lists.php.net to get a copy of this message
On Tuesday, April 9, 2002, at 02:44 PM, JSheble wrote:
I ask this here because PHP developers are notoriously famous for knowing RegExp... the project in question isn't for PHP, but perhaps you can still be a bit of a help? I need help in formulating a RegExp that'll detect PO Box addresses... the problem is the many different ways a PO Box can be expressed.. PO Box PO P.O. Box P O P O Box PMB etc... Anyone care to help out a bit? I would greatly apperciate it!!!!
Would /^[POBXpobx .]{1,8}$/ do it? If you need numbers too, you could add 0-9 and change the max from 8 to 13 and probably be pretty safe. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#92282) next »