split
Regex
String.Split()
String data = "(0)1002(10)1"; String[] values = data.Split("(10)");
string str = string.Empty; str = "(0)1002(10)1"; string str1 = string.Empty; string str2 = string.Empty; int l = str.Length; int f1 = 0; int f2 = 0; for (int i = 0; i < l;i++ ) { if (str[i].ToString() == "(") { f1 = f1 + 1; } else if (str[i].ToString() == ")") { f2 = f2 + 1; } if(i>2 && f1==1) { str1 = str1 + str[i].ToString(); } if(str[i].ToString() != ")" && f2==2) { str2 = str2 + str[i].ToString(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)