Re: Extracting parts of names from full names

2020-02-29 Thread 'anotherhoward' via BBEdit Talk
I would like to thank everyone for their thoughtful comments. What I now realize works best for me is Sam's pattern with "\1 \2" in the replacement pattern and John's. On Friday, February 28, 2020 at 11:08:34 AM UTC-5, John R M. Delacour wrote: > > > > On 28 Feb 2020, at 16:00, I wrote: > >

Re: Extracting parts of names from full names

2020-02-28 Thread 'anotherhoward' via BBEdit Talk
I would like to thank everyone for their thoughtful comments. Because of them, I realize that what would work best for me are Sam's with a space replacing the "\t" in the replacement pattern and John's. On Friday, February 28, 2020 at 11:01:01 AM UTC-5, John R M. Delacour wrote: > > > > On 27

Re: Extracting parts of names from full names

2020-02-28 Thread John Delacour
> On 28 Feb 2020, at 16:00, I wrote: > > Replace all with \1 \2 …or Extract, of course! -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" rather than posting here. Follow @bbedit on Twitter:

Re: Extracting parts of names from full names

2020-02-28 Thread John Delacour
On 27 Feb 2020, at 21:43, 'anotherhoward' via BBEdit Talk wrote: > I have a list of names in this format: > > B.J. Surhoff\surhob.01 > Bobby Bonilla\bonilbo01 > > I want to extract the last names and separately extract what comes before > each last name > (which could be just the first

Re: Extracting parts of names from full names

2020-02-28 Thread ThePorgie
He might be doing a variable data job where the usage in one instance he needs the first name only. In another instance he needs the whole nameJust off the top of my head Darren. On Friday, February 28, 2020 at 9:15:35 AM UTC-5, Darren Duncan wrote: > > What is the business case for this

Re: Extracting parts of names from full names

2020-02-28 Thread Darren Duncan
What is the business case for this separation? For all practical purposes keeping the name as a single string is best. A better solution to your problem may be changing anything that expects parts to expect a single combined name instead, which would then work for names of any nationality. --

Re: Extracting parts of names from full names

2020-02-27 Thread Sam Hathaway
Do the “last names” in your dataset always consist of the final word before the backslash? If so, you can use: Find: `(.*) (\S+)\\.*` Replace: `\1\t\2` But eventually you will need to deal with names that don’t fit this pattern and then you will be sad. For example, in the name Saúl

Re: Extracting parts of names from full names

2020-02-27 Thread Kerri Hicks
How confident are you in your data source that you will always have names in the format of "string with no spaces" "space" "string with no spaces"? Will you ever have names like: Jamie Lee Curtis (space in the "first" names) Onne van der Wal (space in the surname) or other variants? The