Get Email Address

From “Rpa Robot 1 Robot” myrobot1@xyz.com this…How can i get ,Rpa Robot 1 Robot?

@aparna30

Can you explain with more details?

Thanks

Hi @aparna30

Can you elaborate your query?
I understood that you need to extract the email address right?
You can try with regex expression

Regards
Gokul

I Only want the display name that is “Rpa Robot 1 Robot”

Hi @aparna30

Please try this pattern

".*?"

image

Thanks,

Hi @aparna30

Can you share the format of the text, that need to extract
or else
this is the format of the text ? “Rpa [Robot]1 Robot”

Regards
Gokul

Whenever i am trying to extract the from email address by using mail.from.tostring i am geeting the display name and email address so i only want the display name that is “Rpa Robot 1 Robot” I hope that makes sense to you

Thanks but how can i store that in a variable?

Hi @aparna30

we get the value from mail.from.tostring as “Rpa Robot 1 Robot” testmail@outlookc.com

to extract only display name

  1. Create assign variable str_FromMail = mail.from.tostring

  2. Create another assign var str_RegexPattern =“.+” (you need to escape double quotes)

  3. Create another assign var - str_displayname = system.text.regularexpression.regex.match(str_FromMail, str_Regexpattern).tostring - this will give expected value

Thanks,

1 Like

I want to remove the double quotes

Hi @aparna30

In the str_Pattern variable use this regex - (?<=“).*?(?=”)

Thanks

I Got the answer Thank you!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.