21-05-20, 05:01 AM
السلام عليكم و رحمة الله و بركاته
PHP كود :
Public Sub emas(ByVal text As String)
Const MatchEmailPattern As String = "(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@" & "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\." & "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|" & "([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})"
Dim rx As Regex = New Regex(MatchEmailPattern, RegexOptions.Compiled Or RegexOptions.IgnoreCase)
Dim matches As MatchCollection = rx.Matches(text)
Dim noOfMatches As Integer = matches.Count
For Each match As Match In matches
MsgBox(match.Value.ToString())
Next
End Sub
اللهم لك الحمد كما ينبغي لجلال وجهك و عظيم سلطانك
في حل و ترحال


