Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Parsing names

That's not the case. You just add to the "title" section whatever
titles you wish to handle. For example, if you also want to handle
MD, DDS, and LLD, you would just use:

^(\w+)\s+(?:(Jr|Sr|III|II|IV|MD|DDS|LLD)\s+)?(?:(\ w\w+)\s+)(?:([A-Z])\s+)?

The regex does require that you know what titles you wish to use
ahead of time, but there's no need to modify it each time.


What I meant is that if an **unanticipated** title comes along, your code
would have to be modified to account for it. For example, if out of the blue
a name with an unanticipated title such as Esq. comes along... your code
would not be able to handle it until Esq was added to the RegEx pattern.

This may also be of value if the OP needs to check validity of entries.


Yes, I agree with that, which is why I included this statement in my
posting...

"...as long as you know the entries will always be names
and not just gobbledygook, everything should work fine"

Rick Rothstein (MVP - Excel)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Method for Parsing Names Jim Berglund[_2_] Excel Programming 1 October 18th 07 08:00 PM
Parsing names from one column into 3. Kevin Porter Excel Programming 5 August 25th 07 12:54 PM
parsing full names in to 3 columns me[_10_] Excel Programming 9 March 11th 06 09:57 PM
Formulas for Parsing Full names jonefer Excel Worksheet Functions 3 February 14th 06 06:28 AM
Parsing Full Names of varying lenths and parts Dan Excel Programming 1 October 24th 03 06:26 PM


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"