Dynamic string extraction

Hello everyone,

This is my input string “Nikhita,Naidunikhitanaidu@gmail.com” I want to get only the email id nikhitaNaidu@gmail.com as the output dynamically how do I do it ? I need the solution ASAP

Thanks
Nikhita

1 Like

Hello @Nikita_Naidu,

You can use Matches activity and pass your Input string and use the below-mentioned pattern to extract only Mail ID from it,

([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,6})

Cheers
@Nikita_Naidu

3 Likes

@Nikita_Naidu
If there is no separator between the lastname and the email id then, it is not possible to extract the email id alone, we need to know which is the lastname, using that we can split the string and get the email id without any other manipulations.

From where you are getting this string, if you are getting it from the outlook, you can get the email id from their active directory instead.

1 Like

Hi @Nikita_Naidu

You can try with matches activitiy in Uipath

Already regex pattern is predefined for email so u can easily extract the email from the input string and get the results

Hope it helps you

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

2 Likes