You are here: Re: This one better I think. (Re: Regex help for email) « PHP Programming Language « IT news, forums, messages
Re: This one better I think. (Re: Regex help for email)

Posted by Steve on 10/24/07 17:34

"AnrDaemon" <anrdaemon@freemail.ru> wrote in message
news:1805468620.20071024174613@freemail.ru...
> Greetings, Steve.
> In reply to Your message dated Monday, October 22, 2007, 20:53:00,
>
>
> S> "AnrDaemon" <anrdaemon@freemail.ru> wrote in message
> S> news:1979714934.20071021180056@freemail.ru...
>>> Greetings, gezerpunta.
>>> In reply to Your message dated Thursday, October 18, 2007, 18:59:31,
>>>
>>> <?php
>>>
>>> $s = 'celo@tum.com, "mnp test" <celo@tum.com>,"test testt"
>>> <otur@par.com>,
>>> sett@tttt.com,test@twest.com';
>>>
>>> if(preg_match_all('#(?:^|[\s\,])<?([0-9A-Za-z\_]+(?:[\-\.][0-9A-Za-z\_]+)*\@[0-9A-Za-z]+(?:[\.\-\_][0-9A-Za-z]+)+)>?#xi',
>>> $s, $ta))
>>> {
>>> var_export($ta[1]);
>>> }
>
> S> of course you would. however, notice that whatever your prowess at
> regex,
> S> you lack understanding of the basic email conventions explained in the
> S> rfc(s). your preg doesn't allow for atomic account names. ;^)
>
> Example please?

read the freaking email rfc(s).

> What You mean "atomic account names"?

hmmmm, what do you think?

the rfc's allow for 'illegal' characters in account names as long as they're
encapsulated. this is to compensate for non-latin character sets
(particularly, non-english sets). is that ringing a bell?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация