'mails.vbs
'lev
Dim re, tcs, s, ss,d
On Error Resume Next
Set TCS = CreateObject("TCScript.Helper")
ff = TCS.GetSrcSelectedFiles(-1)
Set d = CreateObject("Scripting.Dictionary")
Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.MultiLine = False
re.Pattern = "[\w\d-.]+@([\w\d-]+(\.[\w\-]+)+)"
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
For Each file_name In ff
Set ts = fso.OpenTextFile(file_name, ForReading)
s = ts.ReadAll
Set mm=re.Execute(s)
ts.Close
For Each m In mm
If not d.Exists(Trim(m)) Then d.Add Trim(m), 1
Next
Next
For Each m In d.Keys
ss = ss & m & vbCrLf
Next
MsgBox ss |