Regex for email validation


I’ve been searching the web for ages now and still cannot find a proper working perl regex to validate email addresses. Its kinda urgent so if you could help me that would be great!!
After playing around with bits i found i got this:

preg_match("/^[a-zA-Z0-9_.]+@[a-zA-Z0-9-]+.[a-zA-Z0-9]$/", $email)

which isnt working at all. As i said its pretty urgent so any help will be hugely appreciated!!



You can also use filter_var() with FILTER_VALIDATE_EMAIL (not FILTER_SANITIZE_EMAIL), which uses an RFC822 confirming regex.
(See that regex here: