Hi All,
I have a requirement to get the email address without domain using regex , any help would be appreciated
Example string abcd@xyz.com
Output abcd
Thanks
Hi All,
I have a requirement to get the email address without domain using regex , any help would be appreciated
Example string abcd@xyz.com
Output abcd
Thanks
Hi @jrin3753
Welcome to community
Check this out
System.Text.RegularExpressions.Regex.Replace(yourString.Substring(0,yourString.IndexOf(“@”)),“[^A-Za-z0-9]”,“”)
I can have it in my assign right
system.text.regularexpression.regex.match(yourstring,“[A-Za-z0-9][?=@]“)
or
system.text.regularexpression.regex.match(yourstring,”[A-Za-z0-9][?=@]”).value
output gives as you required
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.