Split ATIVITY

How to split name from gmail ID. or any mail ID.
like as email ID isβ€” manav123@gmail.com
so result is, manav123.

Hi @vaibhav_manav

You can try like this in assign activity

name= Split(β€œmanav123@gmail.com”,β€œ@”)(0)
name should be string

you will get name as manav123

Mark it as solution if it helps :slight_smile:

Thanks & Regards,
Nived N

2 Likes

If we have different different email id. Then how to do this.?

It will be the same as you are taking the string before the @ symbol.

Split(strEmailAddress,β€œ@”)(0)

TestEmail@outlook.com 
you will get TestEmail

or

Test.Email@Company-Email.Com
you will get Test.Email
1 Like

Hey! Welcome to community!

Try this and let me know

System.Text.RegularExpressions.Regex.Match(InputStringVariable,".*(?=@)")

Reference:

Regards,
NaNi

Hello @vaibhav_manav

You will get the name if you are splitting as above.

Your email id= variable having the value of your email ids.

name= Split(Your email id,β€œ@”)(0)

expression will split the email id with the β€œ@” and it will take the first value from it.

Hello, Vaibhav

you need to group a number of data and try to create a rule so that you can split based on it. For example, if all the emails that your process will deal with are in the following format ID@dmain, you can do the following:

name= Split(β€œmanav123@gmail.com”,β€œ@”)(0)

if it’s possible you can share with us a sample of emails that the process will deal with and I may be able to help.

var.split("@"c).toarray(0).tostring

result=str_emaiID.split("@"c).First

str_emailID is the variable with the emailID string
eg:
str_emailID="manav123@gmail.com"
result=str_emaiID.split("@"c).First

Output: manav123