using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"/*.mkv";
string input = @"folder.jpg
metadata
Stargate SG-1 S01E01-E02 Children of the Gods.mkv
Stargate SG-1 S01E03 The Enemy Within.mkv
Stargate SG-1 S01E04 Emancipation.mkv
Stargate SG-1 S01E05 The Broca Divide.mkv
Stargate SG-1 S01E06 The First Commandment.mkv
Stargate SG-1 S01E07 Cold Lazarus.mkv
Stargate SG-1 S01E08 The Nox.mkv
Stargate SG-1 S01E09 Brief Candle.mkv
Stargate SG-1 S01E10 Thor's Hammer.mkv
Stargate SG-1 S01E11 The Torment of Tantalus.mkv
Stargate SG-1 S01E12 Bloodlines.mkv
Stargate SG-1 S01E13 Fire and Water.mkv
Stargate SG-1 S01E14 Hathor.mkv
Stargate SG-1 S01E15 Singularity.mkv
Stargate SG-1 S01E16 Cor-Ai.mkv
Stargate SG-1 S01E17 Enigma.mkv
Stargate SG-1 S01E18 Solitudes.mkv
Stargate SG-1 S01E19 Tin Man.mkv
Stargate SG-1 S01E20 There But For the Grace of God.mkv
Stargate SG-1 S01E21 Politics (1).mkv
Stargate SG-1 S01E22 Within the Serpent's Grasp (2).mkv
";
Match m = Regex.Match(input, pattern);
Console.WriteLine("'{0}' found at index {1}", m.Value, m.Index);
}
}
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