How to split the string


#1

hi,
string s = “EMA123_33”; // I need "EMA"
string s = “EMADRR123_33”; // I need “EMADRR”


#2

Hi @skrishna,

Use Regular expression to get the data.

System.Text.RegularExpressions.Regex.Replace("EMADRR123_33","([^A-Za-z]+)",string.Empty)

Regards,
Arivu


#3

Thank you