fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string pattern = @"(^.*?S[0-9]{1,2}E[0-9]{1,2}\.?)(.*?)((?:1080p|720p|480p).*?)$";
  9. string input = @"The.Real.Housewives.of.Salt.Lake.City.S01E16.1080p.x265.MeGusta
  10. Mr.Mayor.S01E09.Palmtreereform.1080p.HEVC.x265-MeGusta[eztv.re]
  11. BattleBots.2015.S05E12.Were.Beast.Slayin.Tonight.1080p.x265.MeGusta
  12. Growing.Up.Hip.Hop.Atlanta.S04E08.Call.Security.720p.x265.MeGusta";
  13. RegexOptions options = RegexOptions.Multiline;
  14.  
  15. Console.WriteLine(Regex.Replace(input, pattern, "$1$3", options));
  16. }
  17. }
Success #stdin #stdout 0.1s 21324KB
stdin
Standard input is empty
stdout
The.Real.Housewives.of.Salt.Lake.City.S01E16.1080p.x265.MeGusta
Mr.Mayor.S01E09.1080p.HEVC.x265-MeGusta[eztv.re]
BattleBots.2015.S05E12.1080p.x265.MeGusta
Growing.Up.Hip.Hop.Atlanta.S04E08.720p.x265.MeGusta