Looks like my solution was not correct, and you have two good solutions. I did not know about Canonize.
Just for the record I just did this: - Copy file 2 and temporarily paste into file 1 - Process duplicate lines and Copy duplicates to clipboard. - Open original file 1 - Paste - Sort - Use the regex mentioned before Hopefully one of above solutions work. :-) Regards Kaveh On Mon, 5 Aug 2024 at 15:39, [email protected] <[email protected]> wrote: > Canonize... on the Text menu can do this. One file contains a series of > search/replace commands with the search command first, tab, and then the > replacements. This file can be run against other files to perform those > replacements. > > Set up list 2 in a file "remove.txt" and append "\t -" to the end of each > line. This will replace each email address with the dummy character -. > > [email protected] - > [email protected] - > [email protected] - > [email protected] - > > Now, open list 1 and run Canonize... on the Edit menu choosing your > "remove.txt" file. The result looks like this and then you can remove the > stray - lines using search/replace or by sorting them. > > [email protected] > - > - > - > [email protected] > ... > > I used a dummy character - because BBEdit was removing white space from > the end of my lines which I'm sure is a preference somewhere. > > [fletcher] > > > On Aug 5, 2024, at 7:30 AM, Christophe Ribot <[email protected]> > wrote: > > Thank you. > > With this solution I end up with addresses in the starting list that > should not be there. In fact no address from file 2 should be in the result > file. > > An example of what I am trying to do: > > List 1: registered > ------------------ > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > > List 2: unsubscribed (to be removed) > --------------------------------- > > [email protected] > [email protected] > [email protected] > [email protected] > > Expected result > ---------------- > > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > [email protected] > > Thanks for your help > > Le lun. 5 août 2024 à 15:34, Kaveh Bazargan <[email protected]> a > écrit : > >> If it is a clean list with no leading or trailing spaces, and only one >> occurrence of an email in each list, then >> >> - Copy file 2 and add to end of file 1 >> - Process duplicate lines – options should show the choices. >> >> If any more complications you need to do a bit more... >> >> On Mon, 5 Aug 2024 at 14:27, Christophe Ribot <[email protected]> >> wrote: >> >>> Hello everyone, >>> >>> I have two text files composed of email addresses. I want to remove from >>> the first file the emails contained in the second. Is this possible in a >>> simple way with BBEdit? >>> >>> Thanks for your insights. >>> >>> -- >>> This is the BBEdit Talk public discussion group. If you have a feature >>> request or believe that the application isn't working correctly, please >>> email "[email protected]" rather than posting here. Follow @bbedit >>> on Mastodon: <https://mastodon.social/@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/5f9cea39-33b6-43cc-8bd6-b5cb71dd3c8en%40googlegroups.com >>> <https://groups.google.com/d/msgid/bbedit/5f9cea39-33b6-43cc-8bd6-b5cb71dd3c8en%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Kaveh Bazargan PhD >> Director >> River Valley Technologies <http://rivervalley.io/> ● Twitter >> <https://twitter.com/rivervalley1000> ● LinkedIn >> <https://www.linkedin.com/in/bazargankaveh/> ● ORCID >> <https://orcid.org/0000-0002-1414-9098> ● @[email protected] >> <https://mastodon.social/@kaveh1000> >> *Accelerating the Communication of Research* >> >> * >> <https://www.linkedin.com/posts/bazargankaveh_ismte-innovation-award-recipient-kaveh-bazargan-activity-7039348552526921728-XAEB/?utm_source=share&utm_medium=member_desktop> >> [image: >> https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/] >> <https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/>* >> >> -- >> This is the BBEdit Talk public discussion group. If you have a feature >> request or believe that the application isn't working correctly, please >> email "[email protected]" rather than posting here. Follow @bbedit >> on Mastodon: <https://mastodon.social/@bbedit> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "BBEdit Talk" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/bbedit/g5Zx1xOtvQI/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/bbedit/CAJ2R9pgPh6iX08CjRmZrO7xjvSTXfP%3DS-U6xD9%2BbehtS6bUwQA%40mail.gmail.com >> <https://groups.google.com/d/msgid/bbedit/CAJ2R9pgPh6iX08CjRmZrO7xjvSTXfP%3DS-U6xD9%2BbehtS6bUwQA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Christophe Magick! Ribot > T : 06 35 40 05 37 > > @magick <http://twitter.com/magick> > > -- > This is the BBEdit Talk public discussion group. If you have a feature > request or believe that the application isn't working correctly, please > email "[email protected]" rather than posting here. Follow @bbedit on > Mastodon: <https://mastodon.social/@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/CALJ3E3Y3V7m4P-LoTkr2FvTaeko-DFr_7uHbTb8HyAuWyzeMtA%40mail.gmail.com > <https://groups.google.com/d/msgid/bbedit/CALJ3E3Y3V7m4P-LoTkr2FvTaeko-DFr_7uHbTb8HyAuWyzeMtA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > -- > This is the BBEdit Talk public discussion group. If you have a feature > request or believe that the application isn't working correctly, please > email "[email protected]" rather than posting here. Follow @bbedit on > Mastodon: <https://mastodon.social/@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/75A6A9CF-EFCE-4B2F-8DBD-FF24C0FAD45B%40cumuli.com > <https://groups.google.com/d/msgid/bbedit/75A6A9CF-EFCE-4B2F-8DBD-FF24C0FAD45B%40cumuli.com?utm_medium=email&utm_source=footer> > . > -- Kaveh Bazargan PhD Director River Valley Technologies <http://rivervalley.io> ● Twitter <https://twitter.com/rivervalley1000> ● LinkedIn <https://www.linkedin.com/in/bazargankaveh/> ● ORCID <https://orcid.org/0000-0002-1414-9098> ● @[email protected] <https://mastodon.social/@kaveh1000> *Accelerating the Communication of Research* * <https://www.linkedin.com/posts/bazargankaveh_ismte-innovation-award-recipient-kaveh-bazargan-activity-7039348552526921728-XAEB/?utm_source=share&utm_medium=member_desktop> [image: https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/] <https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/>* -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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/CAJ2R9phLv5ubZGNfBwACGtMETtiDe5rCKpUVGYMBU6TqhF1OoQ%40mail.gmail.com.
