The simplest quick and dirty approach might be to start by saying that you are dealing with a space delimited list.  

Once you do that you are dealing with 3 elements: 
1] "Tim
2] Starling"
3 < [EMAIL PROTECTED]>

Then you could then easily strip of the quotes and greater than/less than characters by using left() right() functions or using replace().

If you have well defined patterns of names/email addresses that you can control, this might be a viable option.  Here is the problem though... what happens when the user is:

"Tim B. Starling" <[EMAIL PROTECTED] >

...or something along those lines?  It might be smarter to use regular expressions to find particular strings like "[any characters]"  and email address patterns, and work from that angle.

I realize this is kind of a non-answer, but hopefully it can at least spur some ideas.

~Dave



On 9/3/06, Tim Starling < [EMAIL PROTECTED]> wrote:

Easy question but I can't remember the solution and will probably think of it after I go to bed.  I want to take a string from imported e-mail info and break it into three parts.  For example, taking this:

 

"Tim Starling" <[EMAIL PROTECTED]>  

 

And turning it into these:

 

firstName = "Tim"

Lastname = "Starling"

emailAddress = "[EMAIL PROTECTED]"

 

What is the best way to do that?

 

Thanks,
Tim

 


_______________________________________________
Reply to DFWCFUG:
 [email protected]
Subscribe/Unsubscribe:
 http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
 www.HostMySite.com
  www.teksystems.com/





--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com
www.worldwildweb.biz
_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/

Reply via email to