Re: [PHP] Email with pregmatch

2006-08-31 Thread Curt Zirzow
On 8/27/06, Dave Goodchild [EMAIL PROTECTED] wrote: Try this: preg_match(/^([a-zA-Z0-9.])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/, $_POST['email']); So: [EMAIL PROTECTED] is valid? Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Email with pregmatch

2006-08-31 Thread Curt Zirzow
On 8/27/06, Peter Lauri [EMAIL PROTECTED] wrote: I found this on google, does this LONG function do anything more then your preg_match? i think a combo of what the function does and a few regex's will work. The issue is more on how idoes it pass all the rfc's on each part of the address, for a

Re: [PHP] Email with pregmatch

2006-08-31 Thread tedd
At 1:11 AM -0700 8/31/06, Curt Zirzow wrote: so the question is does it pass local tests, which should be rather simple, the domain part gets rather complcated since you cant predict at what domain level we are talking about: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL

[PHP] Email with pregmatch

2006-08-27 Thread Peter Lauri
Hi, I am trying to check if an email is an email or not, so I used this that I found on the internet: preg_match(/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/, $_POST['email']); BUT, it returns false with the email [EMAIL PROTECTED] And ok for [EMAIL PROTECTED] What is the error here

Re: [PHP] Email with pregmatch

2006-08-27 Thread Dave Goodchild
Try this: preg_match(/^([a-zA-Z0-9.])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/, $_POST['email']); -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

RE: [PHP] Email with pregmatch

2006-08-27 Thread Peter Lauri
; // If we get here then it didn't pass return FALSE; } /Peter From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: Sunday, August 27, 2006 8:47 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Email

Re: [PHP] Email with pregmatch

2006-08-27 Thread Michael B Allen
On Sun, 27 Aug 2006 20:35:47 +0700 Peter Lauri [EMAIL PROTECTED] wrote: Hi, I am trying to check if an email is an email or not, so I used this that I found on the internet: preg_match(/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/, $_POST['email']); This is what I use: