1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Public Function GetAllEMailAddresses(ByVal Input As String) As List(Of String)
Dim Results As New List(Of String)
Dim MC As Text.RegularExpressions.MatchCollection = _
System.Text.RegularExpressions.Regex.Matches(Input, _
"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*")
For i As Integer = 0 To MC.Count - 1
If Results.Contains(MC(i).Value) = False Then
Results.Add(MC(i).Value)
End If
Next
Return Results
End Function
|