Find email in a string
Find email in a string
Rate Find email in a string
(1(1 Vote))
On Error GoTo err_de
Dim X, Y As Integer
Dim Dimension As Integer
Dim Indice As Integer
For X = 1 To Len(Inp)
Select Case Mid(Inp, X, 1)
Case Is = " "
Dimension = Dimension + 1
End Select
Next X
ReDim strEmail(Dimension + 1) As String
Indice = 1
For X = 1 To Len(Inp)
Select Case Mid(Inp, X, 1)
Case Is <> " "
strEmail(Indice) = strEmail(Indice) + Mid(Inp, X, 1)
Case Is = " "
Indice = Indice + 1
End Select
Next X
For X = 1 To Dimension + 1
For Y = 1 To Len(strEmail(X))
Select Case Mid(strEmail(X), Y, 1)
Case Is = "@"
GetEmail = strEmail(X)
Case Else
End Select
Next Y
Next X
Exit Function
err_de:
MsgBox (err.DESCRIPTION)
End Function
Find email in a string Comments
No comments yet — be the first to post one!
Post a Comment