//splits the string and keeps the text before the -->
string startTime = textBox1.Text;
string result = startTime.Substring(0, theString.IndexOf("-->")).Trim();
textBox4.Text = result;
//takes the text after the delimiter
int index = textBox1.Text.IndexOf('>');
string result2 = textBox1.Text.Substring(index + 2);
textBox5.Text = result2;
This code puts each part into separate text boxes and works as i want.
I have a good handle on logic code and can understand what i need to do, but not how to do it.
- I need to read the line and if it contains only an integer, send it to column 1.
-I need to read the line and if it contains '-->' use the above code or similar and send it to cols 2 and 3.
- i need to read the next line and send it to col 4 (1st subtitle text line, will always contain text)
- i need to read the line and if it is blank, make a new row, else append the text to the text in column 4 and then make new row. Then start over.
Logically, i know what to do, but i am having trouble with looping through and processing each line.
Does anyone have any tips that could help me please? Thanks