using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(.+)";
string substitution = @"move \1\\*.* . && rd \1";
string input = @"s01e01
s01e02
s01e03
s01e05
s01e06
s01e07
s01e08
s01e10
s01e11
s01e12
s01e14
s01e15
s02e02
s02e03
s02e04
s02e05
s02e07
s03e01
s03e05
s04e01
s04e02
s04e04
s04e05
s04e06
";
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