Regexp to validate an email address

Quick and dirty regular expression to check if some text is a valid email address. It's not even close to 100% complete, but it's "good enough"

/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})$/
Leave A Reply
All content licensed under the Creative Commons License