'从字符串中获得电子邮件数组
Function GetMailListFromStrStream(ByVal StrStream As String) As ArrayList
Dim Re As System.Text.RegularExpressions.Regex
Dim RegStr As String = "[a-zA-Z0-9]+@([a-zA-Z0-9]+\.)+[a-zA-Z0-9]+" '电子邮件
Dim MailList As System.Text.RegularExpressions.MatchCollection = Re.Matches(StrStream, RegStr)
Dim i As Integer : Dim TmpArrayList As New ArrayList
For i = 0 To MailList.Count - 1
If Not TmpArrayList.Contains(MailList.Item(i).ToString) Then
TmpArrayList.Add(MailList.Item(i).ToString)
End If
Next
Return TmpArrayList
End Function