Re: name and email address parsing
Re: name and email address parsing
- Subject: Re: name and email address parsing
- From: "Kyle Sluder" <email@hidden>
- Date: Tue, 22 Jul 2008 14:19:56 -0400
On Tue, Jul 22, 2008 at 1:23 PM, Wayne Shao <email@hidden> wrote:
> I want to parse our the user's name from email address such as
> "Joe Smith" <email@hidden>
Do be careful; I'm reasonably sure that it is impossible to express
all valid email addresses with a regex. And if it is possible, it's
very, very complicated. So you may not really want to accept only
valid email addresses. Also, the presence of quotation marks is going
to make a proper regex very difficult. You might be better off
implementing a tiny state machine.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden