4

Possible Duplicate:
What is the best regular expression for validating email addresses?

I am a new user in stackOverflow. I have a query which is related with regular expression in PERL. I want to know the correct regex for the email. Example is also given below to create a regex.

for example, abc123@yahoo.co.in or abc345@gmail.com

Community
  • 1
  • 1
Dhaval
  • 41
  • 3

1 Answers1

11

Email validation is really complex task so i recommend to use this code:

  use Email::Valid;
  print (Email::Valid->address('maurice@hevanet.com') ? 'yes' : 'no');
gangabass
  • 10,607
  • 2
  • 23
  • 35