|Welcome to the Monastery|
Re: Phone Number Storageby Brovnik (Hermit)
|on Jul 03, 2001 at 14:11 UTC||Need Help??|
It would be better to store the data in a format which allows you to parse it in later in the same program or in a future version.
As a start, use ',' as a separator, rather than ' ', otherwise it is difficult to know where the name ends and the email starts. E.G.
(Yes, you could write a whizzy regex to anchor the email, but a separator is easier).
This would allow you later to search only the name, by splitting the input as in comes in. Otherwise you are also matching on the email address which may not be what you want. (In my eaxmple above, a search for 'lloyd' would have matched both lines.
Things to think about later :