I am an amateur in coding and I'm struggling with a simple problem. I need to remove the numeration in the .srt file, but I couldn't find the correct regex, using regex might be a bad idea, because the subtitle itself can contain a number, I was thinking about matching "-->" and then removing the previous line, but I couldn't do it. Can someone help me?
I need to remove the following lines (numeration) screenshot
UPDATE
I came up with the following code, which replaces numbers with spaces, but it doesn't delete the line, as I want
var source = File.ReadAllLines("C:\\Users\\name\\Desktop\\temp1\\Doctor.Strange.2016.720p.BluRay.x264.[YTS.MX]-English.srt");
var newFile = @"C:\Users\name\Desktop\temp1\new.srt";
for (int i = 0; i < source.Length; i++)
{
if (source[i].Contains(matchSymbol))
{
source[i - 1] = "";
}
}
File.WriteAllLines(newFile, source);