AnsweredAssumed Answered

Parse name from email

Question asked by mbond on Dec 6, 2018
Latest reply on Dec 8, 2018 by fmpdude

I would like to get the first and last name out of an email address that looks like this:

 

"Parker, Charlie" <CParker@jazz.org>

 

 

I am able to get the email address out with the following script:

 

Let(

  [

    posL = Position(From; "<"; 1; 1);

    posR = Position(From; ">"; posL + 1; 1);

    leftStart = posL + Length("<")

  ];

  If(posL > 0 and posR > posL;

    Middle(From; leftStart; posR - leftStart);

    ""

  )

)

-----------------------------------------------------------------------------------------------------------------------------

I am confused about how to get out "Parker, Charlie"

 

 

thanks

 

 

Matt

Outcomes