I\'m working on a small project in VB.Net where I get a input from a textbox, and need to verify that this is an e-email address.
I found this expression \"^[_a-z0-9
Pick your favorite regex from my article on matching email addresses with a regex, and plug it into this Visual Basic code:
If Regex.IsMatch(SubjectString, "regex") Then
Error = False
Else
Error = True
End If
The best regex to match an email address is a controversial topic that I don't want to get into here. My article discusses the issues that you should be aware of when picking a regex. The regex in Joel Coehoorn's answer is definitely not a good one.