Wednesday, October 27, 2010

How to split a string with more than one delimiter in c#?

The below code will help you to split a string with more than one charatesrs
string Formula = "((1200+2300)4000)";

char[] delimiters = new char[] { '(', ')','+','-','=' };

string[] AcountCodes;

AcountCodes =formula.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);

No comments:

Post a Comment