Hi,
Trying to make a regular expression for the TV-Series plugin for MediaPortal (never used regexp before). Basically it matches a file name with a certain TV series, season, episode, etc.
I have files in a directory being searched like this:
\Sport\Football\Match of the Day\2011-2012\Match of the Day (2011-12-10) [1080i].mkv
\Sport\Football\Match of the Day\2011-2012\Match of the Day (2011-12-17) [1080i].mkv
\Sport\Football\Match of the Day\2011-2012\Match of the Day (2011-12-24) [1080i].mkv
etc.
I'm using the following regexp but it doesn't work and it doesn't even seem to match any part of the file names:
Sport\\Football\\Match of the Day\\201[0-9]-201[1-9]\\<series>\s\(<firstaired>\).<ext>
"series", "ext" and "firstaired" are supposed to be fed into the program. I've also tried ignoring the directory structure (as some of the built-in regular expressions do):
<series>\s\(<firstaired>\).<ext>
but this doesn't work either. :/
Here's a couple of examples of built-in regular expressions that also fail to detect these files:
^(?:.*\\)?(?<series>[^\\]+?)[ _.\-\[]+(?:[s]?(?<season>\d+)[ _.\-\[\]]*[ex](?<episode>\d+)|(?:\#|\-\s)(?<season>\d+)\.(?<episode>\d+))(?:[ _.+-]+(?:[s]?\k<season>[ _.\-\[\]]*[ex](?<episode2>\d+)|(?:\#|\-\s)\k<season>\.(?<episode2>\d+))|(?:[ _.+-]*[ex+-]+(?<episode2>\d+)))*[ _.\-\[\]]*(?<title>(?![^\\].*?(?<!the)[ .(-]sample[ .)-]).*?)\.(?<ext>[^.]*)$
(?<series>[^\\\[]*) - \[(?<season>[0-9]{1,2})x(?<episode>[0-9\W]+)\](( |)(-( |)|))(?<title>(?![^\\]*?sample)[^$]*?)\.(?<ext>[^.]*)
(^.*?\\?(?<series>[^\\$]+?)[ .-]+(?<firstaired>\d{2,4}[.-]\d{2}[.-]\d{2,4})[ .-]*(?<title>(?![^\\]*?(?<!the)[ .(-]sample[ .)-]).*?)\.(?<ext>[^.]*)$)
Thanks for any ideas!