Closed GoogleCodeExporter closed 8 years ago
Thanks Rochess. Has this been verified to work without breaking existing
[YYYY-MM-DD], not sure I will have time to do any regression testing on this
one.
Original comment by damien.haynes@gmail.com
on 8 Oct 2012 at 10:30
Original comment by damien.haynes@gmail.com
on 20 Oct 2012 at 12:01
This is terrible, in copy-n-pasting back and forth some critical parts of the
old expression got removed. Correct expression is:
^(?:.*\\)?(?<series>[^\\]+?)[ _.\-\[]+(?:[s]?(?<season>\d+)[
_.\-\[\]]*[ex](?<episode>\d+)|(?:\#|\-\s)(?<season>(?!(?:\d{4}.\d{2}.\d{2}|\d{2}
.\d{2}.\d{4}))\d+)\.(?<episode>\d+))(?:[ _.+-]+(?:[s]?\k<season>[
_.\-\[\]]*[ex](?<episode2>\d+)|(?:\#|\-\s)\k<season>\.(?<episode2>\d+))|(?:[
_.+-]*[ex+-]+(?<episode2>\d+)))*[ _.\-\[\]]*(?<title>(?![^\\].*?(?<!the)[
.(-]sample[ .)-]).*?)\.(?<ext>[^.]*)$
Old one was:
^(?:.*\\)?(?<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>[^.]*)$
The 'diff' == "(?!(?:\d{4}.\d{2}.\d{2}|\d{2}.\d{2}.\d{4}))", which is an
exclusion expression to only capture the postfixed expression ("\d+" in this
case) if there are no results found. It looks for "4444.22.22" or "22.22.4444"
format as those are the different type of date formats a filename might contain.
Tested it on wide range of filenames, and found no breaking changes.
With this new correct one that is :)
Sorry for the fubar!
Original comment by RoChess....@gmail.com
on 29 Oct 2012 at 10:33
Fantastic, thanks Rochess
Original comment by damien.haynes@gmail.com
on 29 Oct 2012 at 10:41
Done r1980
Original comment by damien.haynes@gmail.com
on 29 Oct 2012 at 10:45
Original issue reported on code.google.com by
RoChess....@gmail.com
on 13 Sep 2012 at 4:22