Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从字符串中提取电子邮件地址?
xxx my@email.com yyy
xxx 和 yyy 可以是任意长度,任意字符。电子邮件地址由空格分隔。
一种可能:
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)