I\'m reading clipboard data coming from excel using
var stream = (System.IO.Stream) ( Forms.Clipboard.GetDataObject() ).GetData( Forms.DataFormats.CommaSepara
From your input example, we can see that there are three "unwanted" sequences of characters:
\"
\",
,\"
So, add all these sequences to the input array for the Split method:
string[] result = clipData.Split(new[] { @",\""", @"\"",", @"\""" },
StringSplitOptions.None);
This will give you an array containing a few empty elements. If that is a problem, use StringSplitOptions.RemoveEmptyEntries instead of StringSplitOptions.None:
string[] result = clipData.Split(new[] { @",\""", @"\"",", @"\""" },
StringSplitOptions.RemoveEmptyEntries);