Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 40417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:01:13+00:00 2026-05-10T15:01:13+00:00

A lot of contact management programs do this – you type in a name

  • 0

A lot of contact management programs do this – you type in a name (e.g., ‘John W. Smith’) and it automatically breaks it up internally into:

First name: John
Middle name: W.
Last name: Smith

Likewise, it figures out things like ‘Mrs. Jane W. Smith’ and ‘Dr. John Doe, Jr.’ correctly as well (assuming you allow for fields like ‘prefix’ and ‘suffix’ in names).

I assume this is a fairly common things that people would want to do… so the question is… how would you do it? Is there a simple algorithm for this? Maybe a regular expression?

I’m after a .NET solution, but I’m not picky.

Update: I appreciate that there is no simple solution for this that covers ALL edge cases and cultures… but let’s say for the sake of argument that you need the name in pieces (filling out forms – as in, say, tax or other government forms – is one case where you are bound to enter the name into fixed fields, whether you like it or not), but you don’t necessarily want to force the user to enter their name into discrete fields (less typing = easier for novice users).

You’d want to have the program ‘guess’ (as best it can) on what’s first, middle, last, etc. If you can, look at how Microsoft Outlook does this for contacts – it lets you type in the name, but if you need to clarify, there’s an extra little window you can open. I’d do the same thing – give the user the window in case they want to enter the name in discrete pieces – but allow for entering the name in one box and doing a ‘best guess’ that covers most common names.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:01:14+00:00Added an answer on May 10, 2026 at 3:01 pm

    There is no simple solution for this. Name construction varies from culture to culture, and even in the English-speaking world there’s prefixes and suffixes that aren’t necessarily part of the name.

    A basic approach is to look for honorifics at the beginning of the string (e.g., ‘Hon. John Doe’) and numbers or some other strings at the end (e.g., ‘John Doe IV’, ‘John Doe Jr.’), but really all you can do is apply a set of heuristics and hope for the best.

    It might be useful to find a list of unprocessed names and test your algorithm against it. I don’t know that there’s anything prepackaged out there, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A lot of programs log things into a text file in a format something
Lot of googling did not help me! Are there any good dictionary web based
A lot of the time I will have a Business object that has a
A lot of programming languages and frameworks do/allow/require something that I can't seem to
A lot of iPhone apps use a blue badge to indicate the number of
A lot of files will be stored in the DB and I need file
A lot of developers say only throw exceptions in truly exceptional circumstances. One of
A lot of times in code on the internet or code from my co-workers
A lot of OS projects I know (I am PHP developer) uses versions as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.