In a previous post, "Extracting parts of names from full names," I asked 
about how to extract the first and last names from a string.

*Here is an input sample:*

Felix Jose\josefe01
Tony Clark\clarkto02
Matt Williams\willima04
John McDonald\mcdonjo03
Mark Grace\gracema01
Steve Finley\finlest01
B.J. Surhoff\surhob.01
J.T. Snow\snowj.01

When I re-examined the full dataset, I noticed two cases not included 
previously.
*Eric Young Sr.\younger0*
*Ken Griffey Jr.\griffke02*

Based on the helpful feedback I got in my previous post, now what I need is 
a pattern that would handle not only all the original input items plus the 
two new cases. Further, what I would like extracted is everything up to but 
not including the backslash.

This attempt (of mine) finds everything in the original dataset, but I was 
unable to expand it to include either the "Sr." or "Jr.":
*^([a-z,A-Z,\.]+) ([a-z,A-Z]+)*

1. Is there a way my attempt can be expanded so it includes "Sr." or "Jr." 
when a name has either of them?
2. What pattern would you write to accomplish the task?

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/8a68d4b5-6d57-4c4c-8cd0-1ed5c30f85d5%40googlegroups.com.

Reply via email to