in reply to A question of logic and syntax
as far as the telephone number thing, it depends on how many formats you need to handle (international numbers, etc) Just choose a set of standards and enforce 'em, for example US numbers all look like (123) 456-7890.
So remove whitespace, check for 3 in parens, 3 outside, dash, then 4. If not, check to see if there is the correct number of digits, and if so, split em up and add the extra punctuation yourself. You just need to adopt a similar standard for any number format you might be handling (and extend the US one for extensions, etc).
Trinary
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A question of logic and syntax
by little (Curate) on Apr 27, 2001 at 22:37 UTC | |
|
Re: Re: A question of logic and syntax
by Rhandom (Curate) on Apr 27, 2001 at 22:57 UTC |