Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct regular expression in PERL for email validation? [duplicate]

Tags:

perl

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, [email protected] or [email protected]

like image 914
Dhaval Avatar asked Dec 02 '11 06:12

Dhaval


1 Answers

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

  use Email::Valid;
  print (Email::Valid->address('[email protected]') ? 'yes' : 'no');
like image 173
gangabass Avatar answered Oct 10 '22 04:10

gangabass