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 は、任意の長さ、任意の文字にすることができます。メールアドレスはスペースで区切ります。
1 つの可能性:
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)