How to split name from gmail ID. or any mail ID.
like as email ID isβ manav123@gmail.com
so result is, manav123.
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
Thanks & Regards,
Nived N
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
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