C#: String split returning list of strings AND list of delimiters?
- by Andrew White
Hi,
Is there any inbuilt way in C# to split a text into an array of words and delimiters?
What I want is:
text = "word1 + word2 - word3";
string[] words = text.Split(new char[] { '+', '-'});
//Need list '+', '-' here?
Any ideas? Obviously I can just process the text by hand... :)