处理电子邮件地址列表的最佳方法 [英] The best way to process lists of email addresses

查看:107
本文介绍了处理电子邮件地址列表的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个文本文件(A,B和C),每个文件都有数百个电子邮件地址.我想将列表A和列表B合并到一个文件中,而忽略大小写和空白的差异.然后,我想删除列表C中新列表中的所有电子邮件,再次忽略大小写和空白之间的差异.

I have got 3 text files (A, B and C), each with several hundred email addresses. I want to merge list A and list B into a single file, ignoring differences in case and white space. Then I want to remove all emails in the new list that are in list C, again ignoring differences in case and white space.

我选择的编程语言通常是C ++,但似乎不太适合此任务.是否有一种脚本语言可以在相对较少的几行中执行此操作(以及类似的任务)?

My programming language of choice is normally C++, but it seems poorly suited for this task. Is there a scripting language that could do this (and similar tasks) in relatively few lines?

或者是否已经有可以免费使用的软件(免费或商用)?例如,可以在Excel中做到吗?

Or is there software already out there (free or commercial) that would allow me to do it? Is it possible to do it in Excel, for example?

推荐答案

正如提到Excel一样,您也可以使用Jet和VBScript进行此类操作.

As Excel was mentioned, you can also do this kind of thing with Jet and VBScript.

Set cn = CreateObject("ADODB.Connection")
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Docs\;" _
& "Extended Properties=""text;HDR=No;FMT=Delimited"";"

cn.Open strCon

strSQL = "SELECT F1 Into New.txt From EmailsA.txt " _
    & "WHERE UCase(F1) Not IN (SELECT UCase(F1) From EmailsC.txt)"
cn.Execute strSQL

strSQL = "INSERT INTO New.txt ( F1 ) SELECT F1 FROM EmailsB.txt " _
    & "WHERE UCase(F1) Not IN (SELECT UCase(F1) From EmailsC.txt)"
cn.Execute strSQL

这篇关于处理电子邮件地址列表的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆