I have a form field that contains one , or several "Complete" email addresses. By "Complete" I mean in the format Personal Name <person@domain.com>
Multiple "complete" email address are separated by a semi-colon. There may or may not be a final semi-colon at the end of the list. I want to extract the Names into one field and the email addresses into another field.
so :
full_email = "Person name <parson@domain.com> ; Another person <another@domain.com> ; "
email_only is set to "parson@domain.com ; another@domain.com ;"
name_only is set to "Person name ; Another person ;"
Is there some reg exp / jQuery bit of genius to copy everything between the < and > into a second field and everything before the < into a third field and do it iteratively/recursively for the whole list of "complete" email addresses to produce two semi-colon separated lists of just pure email address and just pure names?