Re: email validation string.
| From: | Roman Neuhauser | Date: | Fri, 19 Jan 2007 10:16:30 +0000 |
| Subject: | Re: email validation string. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247388@lists.php.net to get a copy of this message | ||
# berber@weber-sites.com / 2007-01-19 10:55:21 +0200:
> From: Don [mailto:don.rzeszut@gmail.com]
> > I'm trying to get this line to validate an email address from a form and it
> > isn't working.
> >
> > if (ereg("^.+@.+\..+$",$submittedEmail))
> >
> > The book I'm referencing has this line
> >
> > if (ereg("^.+@.+\\..+$",$submittedEmail))
1. Why did you remove the backslash? (the original was correct)
2. What do you expect the regexp to match?
3. Define "it isn't working".
> Try this : http://www.weberdev.com/get_example-3274.html
This will reject addresses that use greylisting, and 600 lines
in a single function is gross. I wouldn't touch that.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991