How to Split this email characters

Hi,

I have emails list which contains

abc@gmail.com
xyz35@gmail.com
sys.1998@gmail.com
revanth124@gmail.com
with above example i need to split the characters in mail id to use for Name purpose

i want to get to output has abc,xyz,sys,revanth characters

Regards
Sai

HI @Sai.Srinivas

You can try with Regex expression

System.Text.RegularExpressions.Regex.Match(YourString,"^[A-Za-z]*").ToString

image

image

Regards
Gokul

Hi,

Can you try the following?

arrName = System.Text.RegularExpressions.Regex.Matches(yourString,"^.*(?=@)",System.Text.RegularExpressions.RegexOptions.Multiline).Cast(Of System.Text.RegularExpressions.Match).Select(Function(m) m.Value).ToArray

Sample20230210-8L.zip (2.3 KB)

Regards,

HI @Sai.Srinivas

Checkout this expression

System.Text.RegularEXpressions.Regex.Match(INputString,"[A-Za-z]+(?=.\d)|[A-Za-z]+(?=@)|[A-Za-z]+(?=\d+@)").ToSTring

Regards
Sudharsan