using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^[\d\n].*\n";
string substitution = @"";
string input = @"1
00:00:01.876 --> 00:00:02.709
<v Instructor>We can go back now</v>
2
00:00:02.709 --> 00:00:05.042
to our web server checklist.
3
00:00:06.410 --> 00:00:08.722
We've already seen better ways to organise our code
4
00:00:08.722 --> 00:00:11.545
into reusable pieces with modules,
5
00:00:11.545 --> 00:00:13.315
we've seen ways to deal with files,
6
00:00:13.315 --> 00:00:15.940
both synchronous and asynchronous,
7
00:00:15.940 --> 00:00:16.773
and buffers,
8
00:00:16.773 --> 00:00:18.325
both the built-in Node one
9
00:00:18.325 --> 00:00:20.380
and the ES6 buffers,
10
00:00:20.380 --> 00:00:22.485
and we've seen a way to deal with work";
RegexOptions options = RegexOptions.Multiline;
Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, substitution);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx