Validatiom email
Someone know where hava a example og validation of email.
Thank you!
Someone know where hava a example og validation of email.
Thank you!
What are you hoping to validate, an email *address*, or something else ? Regex to validate email addresses are pretty common, I think expresso even has one built in.
I'm needing that when I client put or email in my form my system talk to me If or email is true else false. Only it!
Thank you a lot! again
This is the regex for email addresses in expresso:
([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})
So something like
if (Regex.IsMatch(string, @"([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})"))
will return true if string is an email address
Don't forget to put using System.Text.RegularExpressions;