Re: split adress and number?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Roland Hall (nobody_at_nowhere)
Date: 03/04/04


Date: Thu, 4 Mar 2004 07:40:22 -0600


"martin" wrote in message
news:c2783a$1qa4o0$1@ID-69224.news.uni-berlin.de...
: >"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
:
: > What if the street name contains a number?
:
: Well, in Sweden they dont. But good question.
: Is it possible to split a string at first apperence of a number?
:
: /martin

Yes, you can do it however you want but you need to have a little
consistency.
Is there a limit on the number of digits?
Do you not want to allow any spaces except between name and number?
What if you had this? Kings Road 3 4 7
Or this? 347 Kingsroad, 347 kings road, 347 KiNGS-RoaD

You could correct this with regular expressions and with using the replace
function but I wouldn't it be easier to require the user to know how to type
in their correct address? In other words, if you are expecting only 1
space, I'd first check to see if there is more than one and if so, return it
back to the user and tell them try again.
Perhaps if you can tell us the known requirements, it would help to devise
something usable.
We need to know what you expect, what you will accept, what the boundaries
are and the order you'd like to have them.

-- 
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp