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