473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

P.O. Box Validation -- Hans?...Steve(Guru)?

Hi,
I need some help getting this P.O. Box regular expression to work, or
a new expression entirely. I got this one from a Google Groups
search. It seems to work at: http://regexlib.com/ but not at runtime.

I need to check if a P.O. Box exists in an address text box...UPS
won't ship some items to a P.O. Box.

ValidationExpression="(?i)^((?<!P\.?\s?O\.?\sBox). )+(?<!P\.?\s?O\.?\sBox)$"

Please help?

TIA,
~Gordon
Nov 17 '05 #1
2 1872
Actually, I think you will find that UPS won't ship _ANYTHING_ to a P.O. Box

Keep in mind also, as you suggest this is valid:

P O Box 123

but so are these:

P.O. Box 123
PO Box 123
P O Box 123
Box 123
#123

(I'm sure I missed some combinations)

You will have to check for each one as may vary from person to person.

In addition UPS may ship to:

132 Main Street
Box 123
Anytown, USA

as it may be a Mailbox Etc. (now UPS Store) store

Just some extra food for thought
Good luck
Brian W

"Simple Simon" <re***@newsgroup.only> wrote in message
news:m5********************************@4ax.com...
Hi,
I need some help getting this P.O. Box regular expression to work, or
a new expression entirely. I got this one from a Google Groups
search. It seems to work at: http://regexlib.com/ but not at runtime.

I need to check if a P.O. Box exists in an address text box...UPS
won't ship some items to a P.O. Box.

ValidationExpression="(?i)^((?<!P\.?\s?O\.?\sBox). )+(?<!P\.?\s?O\.?\sBox)$"
Please help?

TIA,
~Gordon

Nov 17 '05 #2
Thanks for the cautions Brian, you got a regular expression for that?
:P

~Gordon

On Sun, 9 Nov 2003 14:56:48 -0800, "Brian W"
<brianw@gold_death_2_spam_rush.com> wrote:
Actually, I think you will find that UPS won't ship _ANYTHING_ to a P.O. Box

Keep in mind also, as you suggest this is valid:

P O Box 123

but so are these:

P.O. Box 123
PO Box 123
P O Box 123
Box 123
#123

(I'm sure I missed some combinations)

You will have to check for each one as may vary from person to person.

In addition UPS may ship to:

132 Main Street
Box 123
Anytown, USA

as it may be a Mailbox Etc. (now UPS Store) store

Just some extra food for thought
Good luck
Brian W

"Simple Simon" <re***@newsgroup.only> wrote in message
news:m5********************************@4ax.com.. .
Hi,
I need some help getting this P.O. Box regular expression to work, or
a new expression entirely. I got this one from a Google Groups
search. It seems to work at: http://regexlib.com/ but not at runtime.

I need to check if a P.O. Box exists in an address text box...UPS
won't ship some items to a P.O. Box.

ValidationExpression="(?i)^((?<!P\.?\s?O\.?\sBox) .)+(?<!P\.?\s?O\.?\sBox)$"

Please help?

TIA,
~Gordon


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pete Shinners | last post by:
Recently I conducted a short interview with Steve Moret, the Lead Programmer for "Greyhawk: Temple of Elemental Evil". Python was used for the scripting in this commercial game. The interview...
36
by: Dmitriy Iassenev | last post by:
hi, I found an interesting thing in operator behaviour in C++ : int i=1; printf("%d",i++ + i++); I think the value of the expression "i++ + i++" _must_ be 3, but all the compilers I tested...
6
by: anon | last post by:
Post Forwarding question...... For this control below, <asp:Button runat="server" PostTargetUrl="page2.aspx" /> The Attribute: PostTargetUrl="page2.aspx" Is this PostTargetUrl Attribute...
1
by: eXavier | last post by:
Hi, I need to validate XML fragment against XSD schema. The main issue is that xml fragment does not contain refrence to schema, but I want to force the validation against the schema I have in...
1
by: Steve Covert | last post by:
In converting a VB6 app using MSXML2 to a VB.NET app using System.xml, I'm looking a cross-reference. What would the equivalent .NET XML command be to 'transformNodeToObject?' Thanks!
1
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks-...
4
by: Tim::.. | last post by:
I have asked this question several times and can't seem to get the answer I am looking for! I am trying to create a form that responds dynamically to the users choises within the page. At the...
3
by: bruce | last post by:
hi... is there someone in the Bay Area who knows python, that I can talk to ... I have the shell of a real basic app, and I'd like someone who can walk me through how to set it up. i'm...
4
by: timothy.pollard | last post by:
Hi all A few weeks ago a nice man called Evertjan helped me create a form validation system that took a table of four columns of checkboxes and: - allowed only one checkbox in each row to be...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.