Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter out bad email addresses
Does anyone have existing code that filters out bad email
addresses. I can write my own routine, but i need to know what characters are not allowed on the Left and right of the @ sign. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter out bad email addresses
Not sure about the exact regular expression here but something like
this should work. Tim. Function EmailOK(sIn As String) As Boolean Static regEx As Object bValid = False If regEx Is Nothing Then Set regEx = CreateObject("vbscript.regexp") regEx.Pattern = "^[A-Z][\w\.-]*[A-Z0-9]@[A-Z0-9][\w\.-]*[A-Z0-9]\.[A-Z][A-Z\.]*[A-Z]$" regEx.Global = True regEx.IgnoreCase = True End If EmailOK = regEx.test(sIn) End Function "Chris W." wrote in message ... Does anyone have existing code that filters out bad email addresses. I can write my own routine, but i need to know what characters are not allowed on the Left and right of the @ sign. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Macro how to create email link for the email addresses in aRange or Selection | Excel Worksheet Functions | |||
Using Advanced Filter to extract email addresses | Excel Discussion (Misc queries) | |||
filter email addresses | Excel Discussion (Misc queries) | |||
can I copy a column of email addresses, paste into email address? | New Users to Excel | |||
Transfer Email addresses from spreadsheet to email address book | Excel Discussion (Misc queries) |