Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Full Name Parse


Message #1 by "Pete Kipe" <pkipe@c...> on Wed, 22 Jan 2003 06:25:46
With the constraints you have applied, Pete, this is going to take some
definition and a bunch of coding.

As James said, you can create all of the variations of the unformatted
strings that you think your users will input.
Then work out the logic for separating out the components--
Look for {Mr, Mrs, Ms, Dr, etc.}
Look for a comma to indicate reverse name order: Doe, John
Look for a name suffix {Jr, Sr, II, III}
Look for an initial, possibly indicated by a period.
Look for City, State {two digit abbreviation?}
Look for a separate 5-digit number for the zipcode.

After you get this all done to your best ability, I guarantee you that your
users will find a variant you haven't thought of that breaks your logic.

I suggest that you look at web sites that accept name and address inputs and
see if any of these approaches will be acceptable to your users.

Mark

----- Original Message -----
From: "James Fisher" <james-fisher@h...>
To: "professional vb" <pro_vb@p...>
Sent: Wednesday, January 22, 2003 10:13 AM
Subject: [pro_vb] RE: Full Name Parse

> Pete, if it's of any use to you email me some unformatted string examples
> and I'll see if I can come up with suggestions that may help. I suppose
you
> just need to come with a set of rules to interpret the contents of the
> free-format string, eg a single letter represents a middle name, valid
> titles, etc. Even so, the unstring code is bound to involve some intricate
> code.

....
> I'm looking for logic to parse a person's name into its component parts.
> Basically, I'd like to call a function passing a ByVal FullName and five
> ByRef fields representing the various parts of names, and have the ByRef
> field values set by the function.  Here are a few examples of FullNames
> and desired results:

  Return to Index