Acquisition of email from strings

xiaoxiao2021-03-06  60

'Get an email array from strings

Function getmaillistfromstReam (byval strstream as string) AS arraylist

Dim Re as system.text.RegularExpressions.Regex

Dim regstr as string = "[A-ZA-Z0-9] @ ([A-ZA-Z0-9] /.) [A-ZA-Z0-9] " Email

Dim Mailist As System.Text.RegularExpressions.matchCollection = Re.matches (Strstream, Regstr)

DIM I AS INTEGER: DIM TMPARRAYLIST AS New ArrayList

For i = 0 to maillist.count - 1

IF NOT TMPARRAYLIST.CONTAINS (Maillist.Item (i) .tostring) THEN

TMPARRAYLIST.ADD (Mailist.Item (i) .tostring)

END IF

NEXT

Return TMPARRAYLIST

END FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-112097.html

New Post(0)