0

如何从字符串中提取电子邮件地址?

xxx my@email.com yyy

xxx 和 yyy 可以是任意长度,任意字符。电子邮件地址由空格分隔。

4

1 回答 1

2

一种可能:

sString = "my1@email.com xxx my2@email.com yyy my3@email.com"
asString = Split(sString, " ")
For i = 0 To UBound(asString)
    If asString(i) Like "*@*.*" Then
        sEmail = sEmail & "," & asString(i)
    End If
Next

MsgBox Mid(sEmail, 2)
于 2013-02-20T12:25:00.437 回答