Last post Feb 14, 2019 10:06 PM by jzero
Feb 14, 2019 08:52 PM|KulerMaster|LINK
As mentioned in the subject, I need a regex that can catch the following email addresses:
myemailid @ yahoo.com
Meaning, I am aware that these email addresses are not valid but I need such regex to catch entering invalid email address in the biography field.
Feb 14, 2019 09:20 PM|jzero|LINK
Give a try to EmailValidation, is it available on Nuget.
Very simple and cover many other cases
Dim MailOK as string = nothing
If EmailValidator.Validate(<mailaddress>) = true Then
MailOK = "Valid"
MailOk = "Not Valid"
Feb 14, 2019 09:29 PM|KulerMaster|LINK
I am afraid it's not what I am looking for.
Rather I need to catch all invalid email instances and strip them from biography string.
The point is that the contact info is forbidden there.
Feb 14, 2019 10:06 PM|jzero|LINK
Looks you getting a mail address in string.
Try this ([a-zA-Z0-9._-]+\s?@\s?[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)
\s? before/after @ means "Any whitespace Zero or One time"