Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Another Method for Parsing Names | Excel Programming | |||
Parsing names from one column into 3. | Excel Programming | |||
parsing full names in to 3 columns | Excel Programming | |||
Formulas for Parsing Full names | Excel Worksheet Functions | |||
Parsing Full Names of varying lenths and parts | Excel Programming |