AnsweredAssumed Answered

Parsing email using position of "@"

Question asked by TylerNelson on Dec 1, 2013
Latest reply on Dec 1, 2013 by philmodjunk


Parsing email using position of "@"


     Hey! I have a Notes field in a contacts table with emails in it. Only the emails are sometimes at the beginning of the field and sometimes at the end, or even between other notes about the contact.

     Can anyone propose an expression that will parse the values to the left of the @ sign up until the first " " space and do the same for all of the values to the right of the @ sign (to the end of .com, .net or whatnot)? It goes without saying that I will co concatenate the two values with an "@" to rebuild the email. 

     I seem to be pretty close to the correct expression using the middle () function based on the position of the @ sign. But I'm not sure how to capture the values just to the left and right of the @. And I'm not sure how to get the precise number of values before hitting a " " space. Is this a fantasy or can I parse with this precision without a custom function?

     Or maybe some knows of a custom function???