fletcher, Thanks for the quick response. I used
Pattern: ^.*From (.*?) :.*$ Replace: \1 to create a file, then saved it as a text file, and imported that into R where I use the table function to get the output I needed. Howard On Tuesday, 6 October 2020 at 2:42:38 pm UTC-4 [email protected] wrote: > I'd do this in two steps. First, isolate all the names using a > search/replace with the following pattern with "Grep" turned on. Use the > "Extract" button to create a new file. > > Pattern: ^.*From (.*?) :.*$ > Replace: \1 > > That gives you a file with just the names in it on separate lines. > > Harvey Haney > Apple Jones > ... > > Save that to your desktop, e.g. to "names.txt" and then use the Terminal > to run this command on that file. > > cat ~/Desktop/names.txt | sort | uniq -c | bbedit > > That pipes your file through sort to put the lines in order, uniq -c to > replace each duplicated line with a count of how many duplicates there > were, and then pipes it back to a new file in BBEdit which you can save > wherever you want. > > [fletcher] > > > > On Oct 6, 2020, at 11:23 AM, Howard <[email protected]> wrote: > > > > I have the following data (shown below). I want to count how many times > each of the four names appear (Harvey Haney, Apple Jones, Banana Herb, Sam > Blue). Can this be done in BBEdit? If not, I would appreciate suggestions > on how it can be done. > > > > 10:45:57 From Harvey Haney : Good morning. How is everyone today? > > 10:46:08 From Apple Jones : I'm doing good. How are you? > > 10:46:12 From Banana Herb : Good how are you! > > 10:46:18 From Sam Blue : I'm doing fine. How are you? > > 10:45:57 From Harvey Haney : Good morning. How is everyone today? > > 10:46:08 From Harvey Haney : I'm doing good. How are you? > > 10:46:12 From Apple Jones : Good how are you! > > 10:46:18 From Sam Blue : I'm doing fine. How are you? > > 10:45:57 From Harvey Haney : Good morning. > > > > -- > > 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/379b202c-463e-4d7c-8a26-af63ab83d0aan%40googlegroups.com > . > > -- 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/6dda8534-50da-488d-af8b-9916f77d20a3n%40googlegroups.com.
