I need to split a string with a “variable sequence”..
For example, I have this string :
string myString="|1 Test 1|This my first line.|2 Test 2|This is my second line";
I need to get an array of strings with :
This is my first line
This is my second line.
And in the same time, the best of the best would be to get this:
|1 Test1|
This is my first line
|2 Test2|
This is my second line.
Any help?
You could use a regular expression to split the string e.g.
Just discard the first entry (as it will be blank)