[PHP] Re: Richard Lynch's Email Address ...

2005-11-09 Thread Ben Ramsey
On 11/9/05 7:20 PM, GamblerZG wrote: James Benson wrote: Would it not be better something like valid_email() email_validate()? Anyway, I agree that PHP needs such function. Check out http://pecl.php.net/package/filter I've been playing around with this for a while, and it should be note

[PHP] Re: Richard Lynch's Email Address ...

2005-11-09 Thread GamblerZG
James Benson wrote: Would it not be better something like valid_email() email_validate()? Anyway, I agree that PHP needs such function. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-09 Thread GamblerZG
I'm using this, but I'm not sure whether it's bug-free: preg_match('/^([.0-9a-z_+-]+)@([0-9a-z-]+\.)+[0-9a-z]{2,6}$/i', $email); Note: IIRC, PEAR function will invalidate all adresses in museum TLD. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-08 Thread Richard Lynch
On Thu, November 3, 2005 8:16 am, Richard Heyes wrote: > Marcus Bointon wrote: >> The PEAR rfc822 class is pretty good, but it should be noted it's >> designed for parsing entire to, cc, bcc fields which may contain >> multiple addresses, and it's not quite as simple as asking it 'is >> this >> add

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-03 Thread Marcus Bointon
On 3 Nov 2005, at 14:16, Richard Heyes wrote: It even has a method specifically for "normal" email addresses of the form [EMAIL PROTECTED] Ah, well, that's good news. It's been a while since I looked at it. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROT

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-03 Thread Richard Heyes
Marcus Bointon wrote: The PEAR rfc822 class is pretty good, but it should be noted it's designed for parsing entire to, cc, bcc fields which may contain multiple addresses, and it's not quite as simple as asking it 'is this address ok'. News to me... if (!PEAR::isError(Mail_RFC822::parseA

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-03 Thread Marcus Bointon
On 3 Nov 2005, at 04:32, viraj wrote: does PHP really needs a function to validate an email address!! i doubt. because PHP is a language which provides number of string functions with regex capabilities to develop what ever pattern matching you want. Writing a regex for RFC2822 is not easy - t

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-03 Thread Richard Heyes
Curt Zirzow wrote: On Wed, 02 Nov 2005 21:19:24 +0100, Jochem Maas wrote: I totally agree with Richard. about the need for a php func for checking a correct email addr. given that php 'is all about the web', idealogically (still?) pragmatic and dynamically typed: is_email_addr() or is_email(

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread Curt Zirzow
On Thu, 03 Nov 2005 13:42:34 +1000, Ligaya Turmelle wrote: > >>There already is: >> http://php.net/imap_rfc822_parse_adrlist >> >> > quote from user contributed notes: > > "| This function does NOT test the syntax of either the local part, or the > host part, it will permit illegal characte

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread Greg Donald
On Thu, 2005-11-03 at 10:32 +0600, viraj wrote: > second point is, different organizations have different policies on > validating email addresses RFC822 Section 6.1 provides the standard (policy). -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP Gen

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread viraj
dear all, does PHP really needs a function to validate an email address!! i doubt. because PHP is a language which provides number of string functions with regex capabilities to develop what ever pattern matching you want. second point is, different organizations have different policies on validat

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread Ligaya Turmelle
There already is: http://php.net/imap_rfc822_parse_adrlist quote from user contributed notes: "| This function does NOT test the syntax of either the local part, or the host part, it will permit illegal characters on either side."| -- Respectfully, Ligaya Turmelle "Life is a game s

[PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread Curt Zirzow
On Wed, 02 Nov 2005 21:19:24 +0100, Jochem Maas wrote: > I totally agree with Richard. about the need for a php func for checking a > correct email addr. > > given that php 'is all about the web', idealogically (still?) pragmatic > and dynamically typed: > > is_email_addr() or is_email() There

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread Jochem Maas
James Benson wrote: Would it not be better something like valid_email() sounds fine. call it what you like. :-) Reason: The is_* family check for a variable type so dont think that it really fits into the same catagory. twas a long shot ;-) James Jochem Maas wrote: I totally agr

[PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread James Benson
Would it not be better something like valid_email() Reason: The is_* family check for a variable type so dont think that it really fits into the same catagory. James Jochem Maas wrote: I totally agree with Richard. about the need for a php func for checking a correct email addr. given t