I have a problem with a line containing a plus sign (+). I want to break this line (or if there is another way to solve my problem)
string ColumnPlusLevel = "+-J10+-J10+-J10+-J10+-J10";
string strpluslevel = "";
strpluslevel = ColumnPlusLevel;
string[] strpluslevel_lines = Regex.Split(strpluslevel, "+");
foreach (string line in strpluslevel_lines)
{
MessageBox.Show(line);
strpluslevel_summa = strpluslevel_summa + line;
}
MessageBox.Show(strpluslevel_summa, "summa sumarum");
MessageBox is for my testing purpose.
Now ... A ColumnPlusLevel string can have a very diverse entry, but it is always a repeating pattern starting with a plus sign. for example, "+ MJ + MJ + MJ" or "+ PPL14.1 + PPL14.1 + PPL14.1". (It is part of other software, and I cannot edit the output from this software)
How can I find out that this pattern is repeating? In this example, there is + -J10 or + MJ or + PPL14.1
, MessageBox, , , pattering .
, , Split, , .
, .
, , .
.
/Tomas