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 <leadwithlo...@gmail.com> 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 "supp...@barebones.com" 
> 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 bbedit+unsubscr...@googlegroups.com.
> 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 "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/82D5BE7E-AE45-41FF-990D-21B34D130CD4%40cumuli.com.

Reply via email to