Finding String based on Characters Identified

Hi Gurus,

Is it possible to use substr functionality to identify the next string to an identified character? For example I need the email address based on the Email Address: Jo@goo.com

How can I identify “Email Address” and then take Jo@goo.com, appreciate someone can share some thoughts on this… Thanks!

I’m currently using the code below but it needs to predefined the number of characters which is not possible as email address is dynamic…

=Substr([Variable];0;Pos([Variable];"Email Address")+50)

jordy :south_africa: (BOB member since 2014-12-29)

How about something like this if you always get ": " in front of the email.

=Substr([Variable]; (Pos([Variable];”: “)+1);(Length([Variable] - (Pos([Variable];”: “)+1)))

Where (Pos([Variable];”: “)+1) calculates the starting point of the email in the string and (Length([Variable] - (Pos([Variable];”: “)+1)) calculates the number of characters in the email. I am assuming [Variable] is the string that you are trying to parse.


icotler :us: (BOB member since 2002-08-19)

Thanks for sharing, but I get an error as it says Length uses an invalid data type… yes, variable is the string that I’m trying to parse.


jordy :south_africa: (BOB member since 2014-12-29)

Create a variable EmailString as:

=Substr([TextString];Pos([TextString];"Email Address")+15;200)

where TextString is your text object
Then use the following for your email address:

=Left([EmailString];Pos([EmailString];" ")-1)

That works for me on the text that you posted. :slight_smile:

Do you get the same error if you have this formula =Length([Variable]) stand alone?
I think I forgot to put the ) . This is the corrected formula
=Substr([Variable]; (Pos([Variable];”: “)+1);(Length([Variable]) - (Pos([Variable];”: “)+1)))


icotler :us: (BOB member since 2002-08-19)