返回列表 发帖
本帖最后由 apang 于 2014-2-10 00:11 编辑

以#3附件为例,有效邮箱地址1972个,用find或findstr会漏掉很多。
Set fso = CreateObject("Scripting.FileSystemObject")
txt = fso.OpenTextFile("1.txt",1,false,-1).ReadAll
Set re = New RegExp
re.Pattern = "[\w\-\.]+@.+\.(com|cn|net)"
re.IgnoreCase = True
re.Global = True
For Each m in re.Execute(txt)
    s = s & m & vbCrLf
Next
fso.OpenTextFile("2.txt",2,true).Write sCOPY
1

评分人数

TOP

本帖最后由 apang 于 2014-2-16 13:22 编辑

回复 12# battab
附件中有很多类似这样的不规则的行:
谢华电子邮箱:349172507@qq.com移动电话:15311318739
王力飞电话:13811074493|邮箱 ]wanglifeidv@126.com
臧丽媛联系方式:13366640525 邮箱地址:up2013tess@foxmail.comCOPY
用 find /i "mail" 1.txt 或者用for取第二列都会遗漏

TOP

返回列表