//Get and remove the year in the filenameMatch m = Regex.Match(name, "[0-9]{4}");if (m.Success && (m.Value.StartsWith("19") || m.Value.StartsWith("20"))){ year = int.Parse(m.Value); fileName = fileName.Replace(m.Value, "");}
//Strips out anything in []fileName = Regex.Replace(fileName, "\\[.*\\]", "");//lower it because we don't care yo!fileName = fileName.ToLower();//replace commonly used delimitersfileName = fileName.Replace(".", " ");//Kill off this bitchfileName = fileName.Replace("dvdrip", "");//these are mostly uselessif (fileName.IndexOf("(") > 0) fileName = fileName.Substring(0, fileName.IndexOf("("));//Anything left after a - can die in a holeif (fileName.IndexOf("-") > 0) fileName = fileName.Substring(0, fileName.IndexOf("-"));//Query my server for an answerclient.GetClosestMatchByTitleKeywords(fileName, year);
Van Wilder Freshman Year.2009.DvdRip.UR.Xvid {1337x}-NoirMan.on.a.Ledge.2012.PROPER.DVDRip.XviD-SPARKSThe Grey (2012) DVDRip XviD-MAXSPEED
var lederp = [ "Van Wilder Freshman Year.2009.DvdRip.UR.Xvid {1337x}-Noir", "Man.on.a.Ledge.2012.PROPER.DVDRip.XviD-SPARKS", "The Grey (2012) DVDRip XviD-MAXSPEED", "Men In Black III 2012 DVDRip XViD-REFiLL", "The Avengers (2012) [BDRip720p Ita-Eng][A.C.U.M.]", "Frog Dreaming - The Quest - Go Kids", "Parpaillon (1993).Fra.L.Moullet"];for(var i = 0; i < lederp.length; i++) console.log(lederp[i].replace(/[ .]|\(?(\d{4})\)?[ .]\[?(dvd|bd|prop).*$/ig, " $1"));
i had kinda hope speakman had died, what a pity
So I put it indefinitely on hold.
That's the best kind of hold.