Split string
-
Hello Frieds, I just want to ask you that, How to split the string by another string. Take ex.- string tosplit = "10***3*2**5"; string delim = "***"; now o/p should be split1 = 10 split2 = 3*2**5 Thanks in Advance. Rahul Kulkarni.
-
Firstly Thanks for your response. You have suggested "StringSplitOptions". But i think it is not in the framework-1.1 Can you suggest any other solution. Rahul Kulkarni
-
Hello Frieds, I just want to ask you that, How to split the string by another string. Take ex.- string tosplit = "10***3*2**5"; string delim = "***"; now o/p should be split1 = 10 split2 = 3*2**5 Thanks in Advance. Rahul Kulkarni.
Use a regular expression:
Regex re = new Regex(@"\*\*\*");
string[] splits = re.Split(tosplit);
Logifusion[^] If not entertaining, write your Congressman.