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 Rodriguez

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 express

Extracting parts of names from full names

2020-02-27 Thread 'anotherhoward' via BBEdit Talk
I have a list of names in this format: Luis Gonzalez\gonzalu01 Eddie Perez\perezed02 B.J. Surhoff\surhob.01 Bobby Bonilla\bonilbo01 Keith Lockhart\lockhke01 I want to extract the last names and separately extract what comes before each last name (which could be just the first name or two initi

Re: Copying a search pattern to a new document

2020-02-27 Thread Kaveh Bazargan
Yes, should have mentioned Pattern Playground. I have not used that enough yet. Too many good features in BBEdit 13! -- Kaveh Bazargan PhD Director River Valley Technologies • Twitter • LinkedIn

Re: Copying a search pattern to a new document

2020-02-27 Thread Rich Siegel
On Thursday, February 27, 2020 at 5:33:45 AM UTC-8, Mohannad Mahmoud wrote: I am trying to copy a search pattern to a new document. I am not sure this can be done in Canonize or Processing Lines Containing Does this work for you? \A.*?\n.*?\n.*?\n.*?\n.*?\n Note that "Process Lines Contai

Re: Copying a search pattern to a new document

2020-02-27 Thread Rich Siegel
On 2/27/20 at 11:14 AM, ka...@rivervalleytechnologies.com (Kaveh Bazargan) wrote: A very useful site for testing regex is regex101. And you can save and copy a test page and it will be there for ever! I put Greg's suggestion here: Or you could use a Pattern Playground. :-) R. -- Rich Siegel

Re: Copying a search pattern to a new document

2020-02-27 Thread Kaveh Bazargan
Mohannad A very useful site for testing regex is regex101. And you can save and copy a test page and it will be there for ever! I put Greg's suggestion here: https://regex101.com/r/0zaNkG/12 On Thu, 27 Feb 2020 at 16:10, Mohannad Mahmoud wrote: > Will check it, hope it works > > Thanks a lot >

Re: Copying a search pattern to a new document

2020-02-27 Thread Mohannad Mahmoud
Will check it, hope it works Thanks a lot On Thursday, February 27, 2020 at 5:45:40 PM UTC+2, Greg Raven wrote: > > Does this work for you? > > \A.*?\n.*?\n.*?\n.*?\n.*?\n > > On Thursday, February 27, 2020 at 5:33:45 AM UTC-8, Mohannad Mahmoud wrote: >> >> Hello to all, >> >> I am trying to copy

Re: Copying a search pattern to a new document

2020-02-27 Thread Greg Raven
Does this work for you? \A.*?\n.*?\n.*?\n.*?\n.*?\n On Thursday, February 27, 2020 at 5:33:45 AM UTC-8, Mohannad Mahmoud wrote: > > Hello to all, > > I am trying to copy a search pattern to a new document. I am not sure this > can be done in Canonize or Processing Lines Containing > > The file

Re: Copying a search pattern to a new document

2020-02-27 Thread Fletcher Sandbeck
Use the "Extract" button in the Find dialog box. Make sure this is no Replace pattern specified and it will put the entire found pattern into a new document. [fletcher] > On Feb 27, 2020, at 5:31 AM, Mohannad Mahmoud > wrote: > > Hello to all, > > I am trying to copy a search pattern to a n

Copying a search pattern to a new document

2020-02-27 Thread Mohannad Mahmoud
Hello to all, I am trying to copy a search pattern to a new document. I am not sure this can be done in Canonize or Processing Lines Containing The file I am doing a search in has the following; 3/004 03:00:19:18 0041+10 03:00:23:10 0047+02 03:16 5+08 Mrs Nora? Forgive me. (Intenral) Thomas: W