RE: [PHP] Re: email validation (no regex)

From: Date: Wed, 21 Sep 2005 18:16:19 +0000
Subject: RE: [PHP] Re: email validation (no regex)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-222898@lists.php.net to get a copy of this message
jim... validating email means different things to different people... but there's no way you're going to be able to 'throw' together something in 2-3 days that others have taken years to create/refine... if you only want to determine if an email address is valid, what does that mean to you? are you following the current/latest rfc 2822 (i think) standard? or are you just trying to get a quick halfway ok function... as an example, i was looking at a way of using a regex/function for email validation for a user input form... i decided that it was simply too tough to deal with the various nuances, and chickened out, using a combination perl/php approach... but you could do what you want to do. however, it's going to be painful if you want it to match the rfc spec... good luck... -bruce ps. take a look at perl's email::valid function if you want to get a feel for how extensive this task can get... -----Original Message----- From: Jim Moseby [mailto:JMoseby@nrbindustries.com] Sent: Wednesday, September 21, 2005 11:01 AM To: 'Al'; php-general@lists.php.net Subject: RE: [PHP] Re: email validation (no regex) > > So, what is the general thought about validating email > addresses in this > > manner? > > > > JM > Thre is a good reason why virtually everyone uses regex > patterns for email validating. Excellent start! And that good reason is...? How can regex ensure that the email address that is submitted is a valid (ie working, able to receive email) address? Why is regex a better way? JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#222898) next »