using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"([ .\w']+?)($|mp3|[s|S]\d{1,}|\(.*\)|[A-Z]{2,}|\W\d{4}\W?.*)";
string input = @"Better Call Saul S02E03 - Amarillo.mkv
dexter.New.Blood.mp3.S01E03.mkv
Rick.and.Morty.S05E01.720p.AMZN.WEBRip.x264-GalaxyTV.mkv
Black.Widow.mp4
Dexter.New.Blood.S01E01.mp4
Radin (2016) VFF [1080p] BluRay x264-PopHD.mkv
This Is the End 1080p MULTI 2013 BluRay x264.mkv
[ www.CpasBien.cm ] Marseille.2016.FRENCH.DVDRip.XviD-UTT.avi
(Complet)Le Pere Noel Est Une Ordure (Divx-Francais).avi
20.Ans.d.Ecart.2013.FRENCH.BRRIP.XviD-FUZION.avi
Blade.Runner.2049.2017.VOSTFR.FANSUB.1080p.WEB-DL.H264.AC3-TRUEDUKES.WwW.Torrent9.pe";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
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