this will work...
(if you wnat to check against any other possible domains,
just add it into the "|" separated list...
(com|edu|cc|uk|org|tv), and so on.
(the following regexp should be all on one line)
preg_match("/([a-zA-Z0-9]+)\@([a-zA-Z0-9]+)\.(com|edu|net|org|tv)/", $email);
----- Original Message -----
From: "richard merit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 3:06 PM
Subject: Re: [PHP] ereg match problem
> There's a code section at zend.com. I noticed someone
> wrote an email check routine that checks for all
> domains and the correct format. You might try there.
>
> rm
>
> --- "W.D." <[EMAIL PROTECTED]> wrote:
> > I'm testing email address, but want to test not only
> > characters but the @
> > sign and for .com, .net, .org, or .tv. How would I
> > include all of these?
> >
> > $test = $email
> > if( ereg("[a-zA-Z0-9]+)\@([a-zA-Z0-9]+)\.com
> > how would I include the
> > rest?
> >
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]