How to convert names to email adresses

I have a list of names, which I want to convert to email adresses.

Input of names (example names):
Barack Obama
Jack Barker
George W. Bush

Desired output of email adresses:

I have used the replace function to replace " " with “.”
Then I add at the end as it is standard.

The problem occurs when names such as George W. Bush appear. The output will then be: which is wrong.

So all names which contains an abbreviation will cause the wrong output. Anyone knows how to deal with that issue and output the correct email adress as stated above?

Hi @skandi,

If the names like Geoge W. Bush you should apply your predefined rule to replace such type of strings to address.
You can remove any special character in the string before it is going for final trim.
Please give the above inputs in the input dialogue in my solution. you will get the desired output.

Here you go for my solution for the above scenario. Hope you will understand.

GirishMain.xaml (14.6 KB)

1 Like

Hi @Girish,

Thanks for your answer! I tested your file and it worked fine.
But it will only apply to the name George W. Bush, and not other names such as John F. Kennedy. Because you use this function with the character ‘w’:

In my process new names could be added all the time, so then I need to have a function which takes that variable into account.

I think I need to replace the ‘w’ character with some variable, but I am not sure how to make the robot recognize the abbreviation. It could use the “…” as a reference, and remove the character before the “…”

Any idea?

Edit: for some reason when I write two dots in this text editor, it posts three dots. So all “…” means two dots.

Main.xaml (13.3 KB)

1 Like

The above code is working as you expected

Thank you @MahalingPatil . It works as intended :slight_smile: Not really sure why, but I’ll take a closer look at the split function.

what is the problem you are facing?? what type of input you are giving??

Hi guys!

Great solution @MahalingPatil!
But since i have already created a wf that accomplishes the same thing using Regex, i am attaching it anyways :smile:
Main.xaml (11.7 KB)