I have two text files. I'd like to copy a specific part in the first text file and replace it with a part of the second text file.
This is how I read the files:
List<string> PrevEp = File.ReadAllLines(string.Format(@"{0}naruto{1}.ass", url, PrevEpNum)).ToList();
List<string> Ep = File.ReadAllLines(string.Format(@"{0}naruto{1}.ass", url, EpNum)).ToList();
The part in PrevEp
that I need: from the start until it meets a line that includes Creditw,,0000,0000,0000
.
The part I would like to overwrite in Ep
: from the start to a line which is exactly Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
.
I'm not so sure how may I do it. Could you lend me a hand? Thank you very much, gentlemen.