Re: How to ge the ones which are not
| From: | Jochem Maas | Date: | Fri, 11 Mar 2005 18:58:17 +0000 |
| Subject: | Re: How to ge the ones which are not | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-210536@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
...
First, you should be aware that your RegEx is wrong. I know it's wrong, because the CORRECT Regex is 3 *PAGES* long in the camel book.3 pages? does any one use it? is it even feasible to use it?
That said, maybe this will catch *some* invalid email addresses, and not raise any false positives on valid email addresses... Though it sure looks to me like it's gonna complain about *MY* email address, and then I'll never visit your site again.upon hearing that I had to check whether the regexp I generally use to check addrs is washed up against your email addr... I can sleep a little sounder... it does: php -r ' var_dump(preg_match( "#^(([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9}))$#", "ceo@l-i-e.com"));