Re: Regx for validating E-Mail addresses

2004-06-24 Thread Randal L. Schwartz
> "Lrmk" == Lrmk <[EMAIL PROTECTED]> writes: Lrmk> if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ Lrmk> but I am not sure about the illegal chars for an e-mail address Yup, fails on about 99% of the *legal* addresses, and permits *illegal* addresses. Two very important clues:

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Damon Allen Davison
Sorry, I was a little too glib. It was Wiggins' suggestion of Email::Valid I should have referred to. Regexp::Common does almost everything else. Damon Damon Allen Davison wrote: Have a look at Abigail's Regexp::Common on CPAN. That wheel has been invented. ;) -- To unsubscribe, e-mail: [EM

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Wiggins d Anconia
> I am using following code to validate e-mail addresses > > if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ > valid > }else{ > invalid > } > > it will give valid results for all of the following e-mail address > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EM

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Damon Allen Davison
Hi, Have a look at Abigail's Regexp::Common on CPAN. That wheel has been invented. ;) Best, Damon LRMK wrote: I am using following code to validate e-mail addresses if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ valid }else{ invalid } -- Damon Allen Davison http://www.allolex

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Owen
On Thu, 24 Jun 2004 18:17:41 +1000 Owen <[EMAIL PROTECTED]> wrote: > On Thu, 24 Jun 2004 13:29:12 +0600 > "LRMK" <[EMAIL PROTECTED]> wrote: > > > I am using following code to validate e-mail addresses > > > > if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ > > valid > > }else{ > >

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Owen
On Thu, 24 Jun 2004 13:29:12 +0600 "LRMK" <[EMAIL PROTECTED]> wrote: > I am using following code to validate e-mail addresses > > if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ > valid > }else{ > invalid > } A comprehensive regex for checking e-mail addresses may be found at;

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Beau E. Cox
On Wednesday 23 June 2004 09:29 pm, LRMK wrote: > I am using following code to validate e-mail addresses > > if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){ > valid > }else{ > invalid > } > > it will give valid results for all of the following e-mail address > > [EMAIL PROTECTED]